Before I attempt to answer your question, allow me to explain what I mean when referring to the word ‘Church’. Although I am not a Greek scholar, my understanding is that the Greek word ‘ecclesia’ is rooted in the concept of being called out:
***‘kaleo’ = to call
‘kletos’ = called
‘klesis’ = calling***
Whereas the above apply individually, ‘ecclesia’ is corporate. I understand that ‘the ecclesia’ is that which is called out, called by grace, called to glory, and called of God. It refers, not to any building or any denomination, but to all those saints who are baptised by the Holy Spirit into one body of believers. See Romans 8:28; 9:11; 2 Timothy 1:9; 1 Thess. 2:12; 5:24; 2 Thess. 2:14
“The Church” began at Pentecost when the Holy Spirit was poured out on the believers gathered in that upper room in Jerusalem, and they were gathered into one body – ‘the ecclesia’.
I take “Church” to mean the assembly of born-again believers, throughout the ages. I shall use the word ‘ecclesia’ instead of the word ‘Church’ in order to be unambiguous.
With regard to the expression “the gates of Hell”, in the context of Matthew 16:18, I take that to mean neither the grave nor the underworld nor a place of eternal torment, but instead to all the enemies of Christ and his kingdom, which includes Satan and all who follow him, both demonic and human. This is important because of what it says in 1 John 5:21 (KJV):
We know that whosoever is born of God sinneth not; but he that is begotten of God keepeth himself, and that wicked one toucheth him not.
This leads us into your question. Satan, “that wicked one”, cannot touch those who are born of God, ‘the ecclesia’. That is our first clue.
‘The ecclesia’ of Christ are the true sons of God. They have the Spirit of God and the Spirit of Christ. The Holy Spirit bears witness to them that they belong to the Father. They suffer, they groan, they face persecution for righteousness’ sake. They are spiritually minded. They reject the fleshly desires and pursuits of those who are godless. They are not carnally minded.
Throughout the ages they have overcome because they belong to Jesus, not to any denomination, and they abide in Jesus. Jesus has overcome:
I have overcome the world (John 16:33 NIV).
That is our second clue. Jesus has the victory over death (or Hades, or Hell) and this happened at his resurrection. The gates of Hades (or hell) have already been overcome. The gates of Hades (or hell) did not prevail against those first Christians, even though apostasy had already set in. The gates of Hades (or hell) will never prevail over God’s elect, even though they may be few in number.
Apostasy (which means a falling away from the original gospel) has spread and many have been deceived, as was prophesied 2,000 years ago. But there has always been a remnant of God’s chosen people throughout the ages, including the first century. This remnant, the elect, is chosen by grace (Romans 11:5):
So too, at the present time, there is a remnant chosen by grace.”
Are we to suppose that after defeating death itself and having returned to heaven from whence he first came that Christ Jesus is incapable of preserving His ‘ecclesia’? Are we to subscribe to the modern notion that new man-made denominations had to be created in order to dispense “truth”, that the powers of darkness, destruction and death had succeeded in their dastardly plan to defeat the elect? Are we to imagine that the Son of God is incapable of preserving His elect? Never!
Those chosen by God, the elect, those called by God, have defended the faith throughout the centuries (Jude verse 3) because they are loved by God the Father and they are kept by Jesus Christ (Jude verse 1). After all, the Lord is present in the gathered company and it is His household, it is His ‘ecclesia’ and He is the foundation stone. That is our third clue.
Christ crucified, the wisdom and power of God, may be a stumbling block to Jews and foolishness to Gentiles, to those who are perishing, but is the means whereby the elect, those who have been called, ‘the ecclesia’ are being saved (1 Corinthians 1:18, 23-25).
The gates of hell will never prevail against those who are called by God, ‘the ecclesia’, even during the impending Great Tribulation. Why not? Because Jesus is Lord of lords, and King of kings:
and they that are with him are called, and chosen, and faithful (Revelation 17:14).
As prophesied in the days of Isaiah the prophet, and quoted in Romans 9:33, all who place their faith in Christ Jesus, who are called by God, the ‘ecclesia’, will prevail:
See, I lay in Zion a stone that causes men to stumble and a rock that makes them fall, but the one who trusts in him will never be put to shame.
In answer to your question, the witness of Christ's ‘ecclesia’ has never been defeated and the ‘ecclesia’ established by Christ Jesus and held together by His power will never be overcome.