God crowned me emperor in order to do His work on Earth!
No, the Church made you King!
I, Pope Gregory have the authority over both Church and secular leaders. I also have the right to appoint bishops and even remove an emperor from his throne.
Charlemagne was a devout Christian. He received a visit from Pope Leo. Pope Leo had left Rome after rivals had threatened to blind him and remove him from office. The terrified pope fled to the Alps to Charlemagne's court. Charlemagne traveled to Rome with Pope Leo to protect him, where he crowned Charlemagne emperor.
How dare he threaten me, King Henry IV, Holy Roman Emperor!
Charlemagne believed that God had crowned him King in order to do His work on Earth. However, Pope Leo believed that the Church made him emperor. Because of this disagreement, some 200 years later these different views led to a dramatic clash between the emperor and the pope.
I forgive you.
That 200 years later a monk named Hildebrand became Pope Gregory VII. Gregory had strong ideas about the powers popes should have. He issued a bunch of rules that gave him supreme authority over a lot of rules of the Church
Only I can appoint bishops!
No, I can too!
Henry IV, the Holy Roman Emperor at the time, heartily disagreed with Pope Gregory's new rules. They were like a challenge to his own laws and rights. A clash began when Henry ignored Gregory's rules and chose his own bishop for the city of Milan, Italy. In response, Pope Gregory appointed a rival bishop.
To retaliate, King Henry tried to remove Gregory as pope. Pope Gregory then excommunicated Henry. In an effort to end his excommunication, Henry visited Pope Gregory in hopes that he would forgive Henry. Though Pope Gregory forgave him, conflict still arose years later.
The power struggle between popes and rulers continued long after Henry and Gregory died. In 1122, the Church and Holy Roman Empire reached an agreement called the Concordat of Worms. This agreement gave the Church authority to appoint bishops. But it also allowed emperors fiefs to bishops in order to win their loyalty. Despite this, popes and ruler still argued.