It was not Peter himself, but what he said, or what was revealed to him by God, the revelation of Christ.
that no flesh should glory in His presence. -1Cor.1:29
Peter himself was just a man, like everyone else.
But he turned and said to Peter, “Get behind me, Satan! You are a hindrance to me.
For you are not setting your mind on the things of God, but on the things of man.” -Mat.16:23
And as Peter was below in the courtyard, one of the servant girls of the high priest came,
and seeing Peter warming himself, she looked at him and said, “You also were with the Nazarene, Jesus.”
But he denied it, saying, “I neither know nor understand what you mean.” And he went out into the gateway and the rooster crowed.
And the servant girl saw him and began again to say to the bystanders, “This man is one of them.”
But again he denied it. And after a little while the bystanders again said to Peter, “Certainly you are one of them, for you are a Galilean.”
But he began to invoke a curse on himself and to swear, “I do not know this man of whom you speak.”
And immediately the rooster crowed a second time. And Peter remembered how Jesus had said to him, “Before the rooster crows twice, you will deny me three times.” And he broke down and wept. -Mk.14:66-72
I remembered the word of the Lord, how he said, ‘John baptized with water, but you will be baptized with the Holy Spirit.' -
Now when Peter had come to Antioch, I withstood him to his face, because he was to be blamed;
for before certain men came from James, he would eat with the Gentiles; but when they came, he withdrew and separated himself, fearing those who were of the circumcision.
And the rest of the Jews also played the hypocrite with him, so that even Barnabas was carried away with their hypocrisy.
But when I saw that they were not straightforward about the truth of the gospel, I said to Peter before them all, “If you, being a Jew, live in the manner of Gentiles and not as the Jews, why do you compel Gentiles to live as Jews? -Gal. 2:11-14