advise his people not to obey the prince? Didn’t Peter himself say in scripture that we should always obey the authorities in place? I know he was furious at the prince for deposing and humiliating Gregory VI, but it seems he was going against Peter and scripture by trying to depose the prince, and saying the pope had the right to do that.
The key to understand this is to realize that St. Peter was writing in the 1st Century and referring to 1st Century conditions. Gregory VII was operating in the 11th Century; and, at that time, there was such a thing as Christendom, i.e., Christian secular civilization, which was dependent upon the Church and which recognized the moral authority of the Church. In this situation, Gregory VII could call for the deposition of the Holy Roman Emperor for the simple reason that it was from the Papacy that the Holy Roman Emperor received his crown!
The Emperor depended on the authority of the Pope, who consecrated his right to rule the Christian people as their Emperor. If this Emperor opposed the Church and Papal authority (which was precisely what this Emperor was doing in usurping the right to appoint bishops in his realm - a right which belonged to the Church, not to him), then the Pope had the right and the duty to deprive him of his royal authority. The royal authority of Emperor Nero, on the other hand, which is who St. Peter is referring to in 1 Peter (written during the 1st Century) was not dependent on the Papacy or on the Church, or on any kind of agreement between the Empire and the Church. This is because Emperor Nero was not a Christian. But, the Holy Roman Emperor was. This made him part of the Pope’s flock, and subject to the Pope’s authority, especially in Church matters.
Again, the dispute was over a Church matter, namely, the Emperor’s attempt to decide who would be appointed as bishops in the Church. Pope Gregory could not ignore this or let it go unaddressed or unpunished; if he did, Gregory would have been neglecting his Papal office and allowing the Empire to control the Church.