After 1610, when Galileo began publicly supporting the heliocentric view, which placed the sun at the centre of the universe, he met with bitter opposition from some philosophers and clerics, and two of the latter eventually denounced him to the Roman Inquisition early in 1615. In February 1616, although he had been cleared of any offence, the Catholic Church nevertheless condemned heliocentrism as “false and contrary to Scripture”, and Galileo was warned to abandon his support for it—which he promised to do. When he later defended his views in his most famous work, **Dialogue Concerning the Two Chief World **Systems, published in 1632, he was tried by the Inquisition, found “vehemently suspect of heresy”, forced to recant, and spent some time under house arrest. He was not excommunicated.
The Inquisition’s ban on reprinting Galileo’s works was lifted in 1718 when permission was granted to publish an edition of his works (excluding the condemned Dialogue) in Florence. In 1741 Pope Benedict XIV authorized the publication of an edition of Galileo’s complete scientific works which included a mildly censored version of the Dialogue. In 1758 the general prohibition against works advocating heliocentrism was removed from the Index of prohibited books, although the specific ban on uncensored versions of the Dialogue and Copernicus’s De Revolutionibus remained. All traces of official opposition to heliocentrism by the church disappeared in 1835 when these works were finally dropped from the Index.
On 15 February 1990, in a speech delivered at the Sapienza University of Rome,Cardinal Ratzinger (later to become Pope Benedict XVI) cited some current views on the Galileo affair as forming what he called “a symptomatic case that permits us to see how deep the self-doubt of the modern age, of science and technology goes today”. Some of the views he cited were those of the philosopher Paul Feyerabend, whom he quoted as saying “The Church at the time of Galileo kept much more closely to reason than did Galileo himself, and she took into consideration the ethical and social consequences of Galileo’s teaching too. Her verdict against Galileo was rational and just and the revision of this verdict can be justified only on the grounds of what is politically opportune.”
On 31 October 1992, Pope John Paul II expressed regret for how the Galileo affair was handled, and issued a declaration acknowledging the errors committed by the Catholic Church tribunal that judged the scientific positions of Galileo Galilei, as the result of a study conducted by the Pontifical Council for Culture.IIn March 2008 the Vatican proposed to complete its rehabilitation of Galileo by erecting a statue of him inside the Vatican walls. In December of the same year, during events to mark the 400th anniversary of Galileo’s earliest telescopic observations, Pope Benedict XVI praised his contributions to astronomy.
The above is all from Wikipedia. Galileo actually had the support of the Pope, until he wrote The Dialogue,whicht made the Pope basically look like an idiot. He was not excommunicated nor punished, just spent a little time under house arrest, in a nice house actually, then returned to his villa.
By the way, Galileo means “from Galilee”!