Its also the basis for our universities. And the monasteries kept the 'classical world' texts alive allowing for the renaissance at some point. The Middle Ages were a long period over a reasonably large territory and we don't actually know all that much; so it is easy to rant against the Church if you cherrypick times and places.
I'd say we have a lot of things to thank the Church for, and that is from someone with more Protestant sensibilities ;)