The Church had already accepted evolution as fact, back in the 13th century. It was using it as one of the 5 proofs of God. At the time, it was thought (and taught) that evolution proceeded under direct divine intervention -- it is from that idea that the concept of "Intelligent Design" was born.
Even better, based on the writings of Thomas Aquinas on the subject (Summa contra Gentiles, around 1260), to deny evolution was to deny God.
Along comes Charles Darwin. Young Charles joins a seminary (1827 or 1828), wanting to become an Anglican Parson. He learns about evolution in a course called Natural Theology, where the course manual was: Evidences of the Existence and Attributes of the Deity collected from the Appearances of Nature (by William Paley, 1802).
What Darwin did, later in life, was to publish a theory (aproposed explanation based on scientific evidence) showing how evolution COULD work without the need for constant direct divine intervention. THAT is what shocked a lot of people.
Scientists, including Darwin himself, have been trying to prove it wrong* ever since. They can't. Sure, they find tiny errors and make corrections, but in general, the theory is still a useful tool to study evolution.
---
*the theory, not evolution itself since it is an observed fact; the primary job of any scientist, when a new theory is proposed, is to show why it is wrong. Thousands are proposed every year, and only a few survive this kind of testing.