See Wikipedia for more about Copernicus , the 16th-century priest whose astronomical hobby provided evidence to support the theory that the sun was at the center of the solar system. This part of the story is not as well known as the church’s opposition to Gallileo, whose support of the Copernican system irked church authorities.
Gallileo had enemies among secular professors of philosophy (some of whom reportedly refused to look through a telescope), and allies among Jesuit astronomers. The Wikipedia article on Gallileo does a good job explaining the complexity of the case, though it’s not exactly a thrilling read in its present format.
The late Pope John Paul II, who famously built bridges by making humble statements admitting past church wrongs against Jews and fundamentalist Christians, similarly exonerated Gallileo in the 1990s. Around that time, Joseph Ratzinger wrote in defense of the Church’s proceedings against Gallileo. Ratzinger is now Pope Benedict XVI. I don’t think we need to worry about the church hunting down and excommunicating scientists. In light of the cultural rift created by the doctrine of intelligent design, held by some fundamentalist Christians, the Vatican has recently released a statement asserting that science and religion have their own proper spheres of influence. A cardinal invoked the atomic bomb and human cloning as examples of scientific progress that proceeded without influence from ethical and moral principles.