The following is from the Bad Catholic blog. The entire article is actually worth a read, but this section covers on the whole issue of the Roman church at the time attacking Galileo and censoring him, supposedly for his scientific views.
1. That this is the only event in 2000 years of Church history that atheists can point to in order to claim that the Church is opposed to Science seems to indicate that the Church is not in fact opposed to Science.
2. The Church did not say that Galileo was teaching heresy. They rightly pointed out that if the earth did orbit the sun then there would be a shift in the position of a star observed from the earth on one side of the sun, and then six months later from the other side. Galileo was not able with the best of his telescopes to discern this “stellar parallax.” (This was a valid scientific objection, and it was not answered until 1838, when Friedrich Bessel succeeded in determining the parallax of star 61 Cygni.)
The Church gave Galileo the following offer: Copernicanism might be considered a hypothesis, one even superior to the Ptolemaic system, until further proof could be adduced. He refused it. Everyone had to believe in Copernicanism, despite the lack of evidence, and despite Galileo’s obviously wrongheaded claim – that the planets orbit the sun in perfect circles. This still wasn’t a problem until he tried to make his argument on theological grounds. (An irony that atheists remain blissfully unaware of, that the man they lift up as a martyr for scientific discovery was actually a martyr for bad theology.)
3. When Galileo was brought to the Inquisition for his interpretation of Scripture it was by the testimony of a rather stupid priest, Caccini, whose claims were “a web of hearsay, innuendo, and deliberate falsehood,” historian Arthur Koestler writes. The Inquisition dropped all charges against him.
Following this up, the Consultor of the Holy Office and Master of Controversial Questions…Cardinal Robert Bellarmine told Galileo it was perfectly acceptable to maintain Copernicanism as a working hypothesis, and if there were “real proof” that the earth circles around the sun, “then we should have to proceed with great circumspection in explaining passages of Scripture which appear to teach the contrary…” Basically, until you have proof, stop trying to interpret Scripture. Galileo ignored this, continued campaigning, and was then brought to the Inquisition, and put under house-arrest, where he died a mass-going, daily-prayer Catholic. [source]