re: “Did the gates of Hell prevail when Peter denied his Lord three times?”
The short answer - no. The gates of hell will not withstand the attacks of the Church. Even if you take the Catholic position that Peter IS the Rock upon which the Church is built, Peter is NOT the Church personified. Was Peter bringing an attack against Hell at the moment he denied Christ? No. Was he even trying to? I don’t think so. He was falling to the temptation of fear and cowardice. He was the one under attack.
Also, remember that Jesus told him already that this was going to happen, but that Peter would eventually be reconciled with his Lord.
Maybe I’m not sure what you are getting at, but those are my thoughts on your question.
I suppose my thoughts are that Peter is NOT the Rock upon which the Church is built. That Rock is Christ. And He is the Church personified. Without Him (and His sacrifice) there would be no Church. The Church could survive without Peter and there is no mention of any successors to the Apostles after they had deceased. Certainly no successor to the chair of Peter or a Pope. Paul considered himself no less equal than Peter. The very idea of a papacy is anti-Biblical as well as anything suggesting that anyone other than Christ is the foundation of the Church.