Everyone knows that Galileo got in trouble with the Church for claiming that the Earth orbited the sun and not the other way round. In actual fact, he got into trouble not so much for making those claims as such but for publishing them in a really inept and ill-considered manner that could be construed as making the Pope look stupid. The Pope and Galileo actually used to be quite good friends, but that was taking things too far and there were appearances to be upheld, so Galileo did get into considerable trouble over it. (Not as bad as it could have been – he wasn’t burnt at the stake like other people who had made similar claims before him –, but still, quite considerable trouble.)
As far as the concept of science and religion being orthogonal goes, the Vatican at the time had astronomers on staff who were definitely not stupid people and were able to recognise a good idea when it came their way. Also, the science of measuring the movements of heavenly bodies had advanced to a point where it became increasingly clear that the traditional methods of calculating orbits with the Earth at the center of the universe and everything else moving around it on circles moving on other circles might no longer be able to explain the actual measurements, so at some point something had to give. (Kepler’s idea of using ellipses instead of circles for the orbits also helped because it made the measurements match the theory that much better.)
It did take the Catholic Church a number of centuries to make it official, but today, Scripture notwithstanding, it no longer has a beef with Galileo and colleagues and their heliocentric ideas – which is just as well because if religion denies science, it does tend to make religion look stupid in the end, and, unlike in the 17th, in the 21st century the Pope is no longer in a position to get scientists into serious trouble if the Church looks stupid in a scientific debate.