The whole business about Galileo's arrest and persecution could have been averted if only Galileo hadn't been such an arrogant sod.
Galileo had a history of acting as if his knowledge and observations of the world and skies set him up waaaay above his peers. He was often denigrating and insulting of those who did not understand or disagreed with his arguments and, rather like a certain person who recently returned to this forum, dismissed everyone who suggested he might be wrong as idiots best ignored. Unlike Heiwa, he was actually a remarkable scientist, and his arguments do indeed form the basis of a lot of modern science. He explained the ideas of relative motion centuries before Einstein formalised them with calculations, for example.
What he is best remembered for now is, of course, his conflict with the Catholic Church. He agreed with the Copernican idea that the Earth revolved around the Sun. Unlike Copernicus, who had simply hypothesised and drawn up new models, he had the tools to make better observations that supported some of the ideas. The phases of Venus, for example, or the discovery of the four largest moons of Jupiter which are still to this day known as the Galilean satellites. Here for the first time were observational proofs that not everything revolved first and foremost around the Earth. Jupiter's moons were clearly revolving around Jupiter, whatever Jupiter itself was revolving around. Venus's phases were only possible if Venus revolved around the Sun. Galileo presented these observations to many people and argued in favour of the heliocentric system. The church in fact had nothing against his promotion of this idea.
What is often not mentioned by the people who want to use Galileo's persecution as some kind of defence for their arguments is that Galileo was not just some random scientist whose book caught the eye of the church officials and ticked off the Pope. Galileo was a personal freind of the Pope at that time and had many a face to face conversation with him about the studies he had made of the heavens. He requested, and was granted, permission to publish his ideas about the heliocentric model directly from the pope, under the condition that he include a disclaimer to the effect that since God is omnipotent he could easily have made the system appear to fit a heliocentric model while still having the Earth fixed in the centre. After all, He can do anything. Galileo agreed.
He then shot himself in the foot, because his arrogant nature couldn't let him pass up the opportunity to snidely show what he thought of these arguments. He wrote the treatise as a dialogue between three people: The scientist, who represented his own arguments; the 'man in the street', who was basically the intelligent but ill-informed man who provided the questions to be answered; and the religious person who held to the belief of a geocentric world. It's a brilliant piece of work, but for two things: First, his scientist has all the same arrogance and dismissveness of Galileo, and is frankly obnoxious, several times going off on long rants about how idiotic some of the arguments against his conclusions are and what fools people must be to hold to them. Second, the religious character was given the name Simplicio which, as it sounds, means loosely 'simpleton'. He put all the geocentric arguments and the disclaimer insisted upon by the Pope in the mouth of this simple person he'd been ridiculing throughout the work! Oddly enough, the Pope and his cardinals were not overly impressed by this, and hence the whole house arrest and trial occurred. Galileo had been given a chance to publish his arguments but couldn't resist ticking off the highest authority in the land, and paid the consequences for it.
He was never persecuted simply because he believed in a heliocentric system, though this is often what the crackpots believe (or want us to believe), but rather he suffered because of the way he presented it.
I can strongly recommend reading the work, Dialogue on the Two Chief World Systems. It is a brilliant read if you can get past the rudeness of the main protagonist, and shows just how intelligent Galileo actually was.