On the contrary, it is in the bosom of the Church that intellectual life flourished in Europe. Scholastic thought brought to fruition a degree of rigorous thinking unseen before. It worked out the intellectual foundations that made modern science possible. As Stanley Jaki argues, despite the obvious ingenuity of various ancient cultures and civilizations, science never really took off anywhere else to become a sustained enterprise. This is not a coincidence, but a result of worldview and beliefs about the nature of reality, the possibility of knowledge, and the point of human existence. If you believe reality is fickle and unintelligible, if you believe life runs in circles and leads nowhere, you will have little motivation to pursue science.
Where Galileo is concerned, the whole affair was hardly a matter of science. Galileo was notoriously cantankerous, and it was his habit of insulting and assaulting public figures (which included some who were his friends) that landed him in hot water. (Public insults were his way of responding to people who either disagreed with his unproven claims, ones he pushed aggressively, or tried to explain to him that he had not actually demonstrated his claims.) Heliocentrism was not heretical, so there was no possible doctrinal basis for accusing him of heresy. And the penalty was that an old man was put under house arrest in a comfy apartment overlooking the Vatican gardens. Whatever you might say about the justice of the penalty, given the norms of the day (witch hunts in Northern Europe anyone?), this was relatively mild, and nothing to do with "science".