Popes Gelasius and Gregory, on either side of
Charlemagne, from a manuscript of the time of
Charles the Bald
The bishop of Rome, or the Pope, wasn't the only powerful bishop. The bishops of Alexandria in Egypt, of Jerusalem in Israel, of Carthage in North Africa, and of Constantinople in modern Turkey were also very powerful men (women weren't allowed to be bishops). But when the Roman Empire collapsed, in the 400s AD, all of those other places were in the Eastern half of the Empire (which kept on going) and only the Pope in Rome was in the part that collapsed. So in Western Europe, people began to think of the Pope as the only father of the church. When the Umayyads conquered Alexandria, Jerusalem and Carthage in the 600s AD, and those places became mostly Islamic, the Pope became even more important for the places that were still Christian.
When the Ostrogoths lost control of Italy in the 500s AD, the Pope also got to have political power, as well as religious power. In the Middle Ages, the Pope was pretty much the king of central Italy. One famous pope from this time was Pope Gregory the Great.
But the Pope's army wasn't always strong enough to keep control of his kingdom all by himself. The Pope needed help from other armies - usually the French or the Holy Roman Empire, or other city-states in Northern Italy. So the Pope was always making threats or promises and arrangments to get these other armies to help him. One threat the Pope could make was the Interdict, where he would excommunicate an entire country. The Pope put England under the Interdict under King John, about 1200 AD.
Sometimes this kind of help wasn't enough. In the 1300s, the bishops had a big argument about who should be the next Pope, and two different sides each chose their own Pope. One Pope stayed in Rome, while the other one had to run away and live in Avignon, in the south of France. This argument went on for nearly a hundred years before the two sides managed to agree on who would be the Pope. The time when the Popes had to live in Avignon is called the Babylonian Captivity, because it is like the time when the Jews had to live in Babylon.