The rock at Caesarea Philippi, where Jesus called Peter the "Rock." He was using the surroundings to illustrate the word picture of His message. This cave had been referred to as the "gates of hell."
My answer to a question of an inquirer on the CHNI forum:
That is my understanding of it, yes (both as a Protestant and Catholic). It's not that hell can't overcome the Church, but that it will not be able to stand the eventual dominance of the Church over its diabolical domain, to destroy the devil's dominion over the world.
Lutheran apologists Bob and Gretchen Passantino (Gretchen is an acquaintance of mine) wrote a helpful little commentary on this.
A Catholic Commentary on Holy Scripture (Dom Bernard Orchard, 1953) offers significant commentary on the phrase (note, first of all, that the Greek word for "hell" in this passage is Hades, not gehenna):
Simon is to be the ultimate authority on earth of this society which is itself the hierarchical body described in 18:15-18. By reason of this rock-foundation the malignant powers will not prove stronger than the citadel-society. The phrase 'gates of Hell' needs some explanation. The term 'gates' in Hebrew is often used of the fortified city itself (Gen 22:17; 24:60; Is 14:31, etc.) 'Hell' (Hades), dwelling place of demons (four times in this sense in the Apocalypse, . . . cf. Lk 16:23) is not merely 'death' (an idea which would confuse the warlike image) but the activity of forces hostile to the cause of Good. . . . In 19 the metaphor changes: the besieged citadel founded on a rock now becomes the Kingdom with its Chancellor to whom Christ will in due time commit his own keys, Jn 21:15-17 . . . This idea serves as a bridge from the rock-metaphor to the more direct definition of Peter's powers (Lagrange).Eerdmans Bible Commentary (Protestant) states:
. . . literally, 'the gates of Hades or Sheol'. The phrase occurs in the writing of Hezekiah (Is. 38:10). The gates suggest the picture of a fortress or prison which lock in the dead and lock out their rescuers. This would imply that the church is on the offensive, and its Master will plunder the domain of Satan (cf. 12:29; 1 Pet. 3:18-20).Baptist linguistic scholar A.T. Robertson, in his Word Pictures in the New Testament, offers additional commentary:
The gates of Hades (pulai aidou) shall not prevail against it (ou katiscusousin authß). Each word here creates difficulty. Hades is technically the unseen world, the Hebrew Sheol, the land of the departed, that is death. Paul uses qanate in 1 Corinthians 15:55 in quoting Hosea 13:14 for aidh. It is not common in the papyri, but it is common on tombstones in Asia Minor, "doubtless a survival of its use in the old Greek religion" (Moulton and Milligan, Vocabulary). The ancient pagans divided Hades (a privative and idein, to see, abode of the unseen) into Elysium and Tartarus as the Jews put both Abraham's bosom and Gehenna in Sheol or Hades (cf. Luke 16:25). Christ was in Hades (Acts 2:27,31), not in Gehenna. We have here the figure of two buildings, the Church of Christ on the Rock, the House of Death (Hades). "In the Old Testament the 'gates of Hades' (Sheol) never bears any other meaning (Isaiah 38:10; Wisd. 16:3; 3Macc. 5:51) than death," McNeile claims. See also Psalms 9:13; Psalms 107:18; Job 38:17 (pulai qanatou pulwroi aidou). It is not the picture of Hades attacking Christ's church, but of death's possible victory over the church. "The ekklhsia is built upon the Messiahship of her master, and death, the gates of Hades, will not prevail against her by keeping Him imprisoned. It was a mysterious truth, which He will soon tell them in plain words (verse Job 21); it is echoed in Acts 2:24,31" (McNeile). Christ's church will prevail and survive because He will burst the gates of Hades and come forth conqueror. He will ever live and be the guarantor of the perpetuity of His people or church. The verb katiscuw (literally have strength against, iscuw from iscuß and kat-) occurs also in Luke 21:36; Luke 23:23. It appears in the ancient Greek, the LXX, and in the papyri with the accusative and is used in the modern Greek with the sense of gaining the mastery over. The wealth of imagery in Matthew 16:18 makes it difficult to decide each detail, but the main point is clear. The ekklhsia which consists of those confessing Christ as Peter has just done will not cease. The gates of Hades or bars of Sheol will not close down on it. Christ will rise and will keep his church alive. Sublime Porte used to be the title of Turkish power in Constantinople.
Protestant scholar Marvin Vincent also gives elaborate, extensive commentary, in his Word Studies in the New Testament:
Gates of hell (pulai adou). Rev., Hades. Hades was originally the name of the God who presided over the realm of the dead - Pluto or Dis. Hence the phrase, house of Hades. It is derived from aj, not, and ijdein, to see; and signifies, therefore, the invisible land, the realm of shadow. It is the place to which all who depart this life descend, without reference to their moral character.
By this word the Septuagint translated the Hebrew Sheol, which has a similar general meaning. The classical Hades embraced both good and bad men, though divided into Elysium, the abode of the virtuous, and Tartarus, the abode of the wicked. In these particulars it corresponds substantially with Sheol; both the godly and the wicked being represented as gathered into the latter. See Gen. xlii. 38; Ps. ix. 17; cxxxix. 8; Isa. xiv. 9; lvii. 2; Ezek. xxxii. 27; Hos. xiii. 14. Hades and Sheol were alike conceived as a definite place, lower than the world. The passage of both good and bad into it was regarded as a descent. The Hebrew conception is that of a place of darkness; a cheerless home of a dull, joyless, shadowy life. See Psalms vi. 5; xciv. 17; cxv. 17; lxxxviii. 5, 6, 10; Job x. 21; iii. 17-19; xiv. 10, 11; Ecclesiastes iv. 5. Vagueness is its characteristic. In this the Hebrew's faith appears bare in contrast with that of the Greek and Roman. The pagan poets gave the popular mind definite pictures of Tartarus and Elysium; of Styx and Acheron; of happy plains where dead heroes held high discourse, and of black abysses where offenders underwent strange and ingenious tortures.
There was, indeed, this difference between the Hebrew and the Pagan conceptions; that to the Pagan, Hades was the final home of its tenants, while Sheol was a temporary condition. Hence the patriarchs are described (Heb. xi. 16) as looking for a better, heavenly country; and the martyrs as enduring in hope of "a better resurrection." Prophecy declared that the dead should arise and sing, when Sheol itself should be destroyed and its inmates brought forth, some to everlasting life, and others to shame and contempt (Isa. xxvi. 19; Hos. xiii. 14; Dan. xii. 2). Paul represents this promise as made to the fathers by God, and as the hope of his countrymen (Acts xxvi. 7). God was the God of the dead as well of the living; present in the dark chambers of Sheol as well as in heaven (Psalms cxxxix. 8; xvi. 10). This is the underlying thought of that most touching and pathetic utterance of Job (xiv. 13-15), in which he breathes the wish that God would him with loving care in Hades, as a place of temporary concealment, where he will wait patiently, standing like a sentinel at his post, awaiting the divine voice calling him to a new and happier life. This, too, is the thought of the familiar and much-disputed passage, Job xix. 23-27. His Redeemer, vindicator, avenger, shall arise after he shall have passed through the shadowy realm of Sheol. "A judgment in Hades, in which the judge will show himself his friend, in which all the tangled skein of his life will be unravelled by wise and kindly hands, and the insoluble problem of his strange and self-contradicting experience will at last be solved - this is what Job still looks for on that happy day when he shall see God for himself, and find his Goel (vindicator) in that Almighty Deliverer" (Cox, "Commentary on the Book of Job").
In the New Testament, Hades is the realm of the dead. It cannot be successfully maintained that it is, in particular, the place for sinners (so Cremer, "Biblico-Theological Lexicon"). The words about Capernaum (Matt. xi. 23), which it is surprising to find Cremer citing in support of this position, are merely a rhetorical expression of a fall from the height of earthly glory to the deepest degradation, and have no more bearing upon the moral character of Hades than the words of Zophar (Job xi. 7, 8) about the perfection of the Almighty. "It is high as heaven - deeper than Sheol." Hades is indeed coupled with Death (Apoc. i. 18; vi. 8; xx. 13, 14), but the association is natural, and indeed inevitable, apart from all moral distinctions. Death would naturally be followed by Hades in any case. In Apoc. xx. 13, 14, the general judgment is predicted, and not only Death and Hades, but the sea give up their dead, and only those who are not written in the book of life are cast into the lake of fire (ver. 15). The rich man was in Hades (Luke xvi. 23), and in torments, but Lazarus was also in Hades, "in Abraham's bosom." The details of this story "evidently represent the views current at the time among the Jews.
According to them, the Garden of Eden and the Tree of Life were the abode of the blessed.... We read that the righteous in Eden see the wicked in Gehenna and rejoice; and similarly, that the wicked in Gehenna see the righteous sitting beatified in Eden, and their souls are troubled (Edersheim, "Life and Times of Jesus"). Christ also was in Hades (Acts ii. 27, 31). Moreover, the word geenna, hell, (see on Matt. v. 22), is specially used to denote the place of future punishment.
Hades, then, in the New Testament, is a broad and general conception, with an idea of locality bound up with it. It is the condition following death, which is blessed or the contrary, according to the moral character of the dead, and is therefore divided into different realms, represented by Paradise or Abraham's bosom, and Gehenna.
The expression Gates of Hades is an orientalism for the court, throne, power, and dignity of the infernal kingdom. Hades is contemplated as a mighty city, with formidable, frowning portals. Some expositors introduce also the idea of the councils of the Satanic powers, with reference to the Eastern custom of holding such deliberations in the gates of cities. Compare the expression Sublime Porte, applied to the Ottoman court. The idea of a building is maintained in both members of the comparison. The kingdom or city of Hades confronts and assaults the church which Christ will build upon the rock. See Job xxxviii. 17; Ps. ix. 13; cvii. 18; Isa. xxxviii. 10.
I've also been trying unsuccessfully to find if the early church fathers had any insights on this phrase, and am curious to know what the Catholic understanding of it is.
I haven't been able to find anything by the Fathers, on this. I tried! I don't think Protestants and Catholics differ all that much on the meaning of the phrase. We differ, of course, on the Petrine / papal aspects of the same passage.
Also, is this phrase only true of the Catholic Church?
It is true of the Church. We believe that the Church subsists in the Catholic Church and that Protestants are imperfectly part of the one true Church, so they play a role in this, while lacking the fullness of Catholic truth.