After the fall of the Roman Empire in 476 A.D., the church became more dominant in Europe. Christianity, specifically Catholicism, was the only religion recognized during the Middle Ages.
The first step to increase the Church's influence was the conversion of Clovis, king of the Franks, in 496. When he became a Catholic the pope started to support them, which exposed the Franks to the Christian knowledge and culture. Later, the Church was not only involved in people's education and in their healthcare, but it also inspired and promoted the art, culture and philosophy of the time. Everything people did at the time in their social life was affected by the Church.
Pope Gregory I the Great (pope from 590-604 A.D.) also helped increasing the influence of the Church. He sent monks to convert the pagans in Anglo-Saxon regions, spreading that influence even more. He also put in place a hierarchical system where politically, the Church had some degree of power over the State. They had an influence over the ruler's opinions and decisions, so the government was built upon Christian values--a theocracy.
It provided a sense of stability and leadership, and people truly believed in it. Since they did not want to be cut off from heaven, every peasant had to work at the Church's land for free every week, and pay them 10% of their earnings--sometimes paid in grain. Also, the Church did not pay taxes. Eventually, it became so rich that their economic power was greater than of some monarchs. They could mobilize armies and build allegiances with their wealth.