Churches and religion in general played HUGE parts in the middle ages.
Churches are often depict as corrupt in the past and even now. They were given immense power in politics and social standing by using the magic word, "God."
If you were a King, a Pope saying, "God doesn't believe you should be king," was an instant killer of your reign. The church swayed powerful politicians to preach their views and get certain laws passed that they wanted passed because no one could dare argue with the word of God.
Hope this helps!! (: