Many people believe that the Catholic Church persecuted Galileo because he rejected the popular view at the time that the Solar System revolved around the Earth (geocentric). Galileo suggested that the Solar System revolved around the sun (heliocentric).
Way back in the 1500's everyone thought that the heavenly bodies revolved around the earth. Nicolaus Copernicus came up with the idea that they revolved around the sun. He wrote a book, On the Revolution of the Celestial Orbs, in which he gave an account of heliocentricity to Pope Paul III. Later, Johannes Kepler published an article which expanded on Copernicus’ work. His work was well received by some Jesuit scientists at the time.
In modern times many people believe Galileo proved heliocentricity. He could not answer the strongest argument against it. If heliocentrism were true, then there would be observable parallax shifts in the stars’ positions as the earth moved in its orbit around the sun. The technology at the time prevented scientist from observing this. The only evidence they had suggested that the stars were fixed in their positions relative to the earth and therefore the earth and the stars were not moving in space—only the sun, moon, and planets were.
Galileo's problems arose when he stopped proposing heliocentrism as a scientific theory but began proclaiming it as truth even though there was no conclusive proof of it at the time.
This in itself was not all that serious but it became a big problem when he started telling scripture scholars how to interpret the Bible.
Just remember that at this point in time nearly everyone including scientists and clergy believed in the geocentric model. So when scripture scholars read passages like- "And the sun stood still, and the moon stayed . . ." (Josh. 10:13) or (Psalm 93:1) “....The world is firmly established; it cannot be moved”. most people took the passages literally. It was offensive for the church to have this scientist propose a theory he cannot prove and then suggest that the church reinterpret scripture to suit. Scripture scholars of the past were willing to consider whether particular statements were to be taken literally or phenomenologically, but they weren't going to reinterprete scripture based on an unprovable unpopular scientific theory.