Jesus was the one who gave Simon Bar-Jonah his more popular name, Peter. It means "rock". (And, since "Bar-Jonah" means "Son of John", Peter could be named Rock Johnson. But I digress.) When He named him Peter, He said this. "On this rock I will build My church, and the gates of hell shall not prevail against it." (Matt 16:18) Two observations here. First, "gates" ("the gates of hell") are not an offensive weapon. Jesus intended to plunder hell. Second, it was not Peter or Paul or anyone else who would build the church. Jesus said, "I will build My church."
The New Testament is full of warnings to do good, to persevere, to endure, to stand. We are unequivocally and unabashedly ordered to "work out your salvation with fear and trembling" in a Bible that repeatedly tells us that we are saved by faith, not by works. When it comes to "This is your job" in the Bible, you will constantly find that our assignment is to work for Christ.
("Can we be honest here, Stan? This isn't exactly encouraging." Hold on. I'm not done.)
While the Bible is full of commands we are supposed to follow, there is another aspect that is equally prevalent in the pages of Scripture. There is our assignment--"Let your light shine before others, so that they may see your good works and give glory to your Father who is in heaven." (Matt 5:16) And there is Someone else at work. Every reference to God's actions in the matter of salvation and preservation is that of sovereignty and success. We are saved by grace through faith, "for we are His workmanship, created in Christ Jesus for good works, which God prepared beforehand, that we should walk in them." (Eph 2:10) We can be "sure of this, that He who began a good work in you will bring it to completion at the day of Jesus Christ." (Phil 1:6) While we work out our salvation, "it is God who works in you, both to will and to work for His good pleasure." (Phil 2:13) (See also Jude 1:24-25; Rom 8:38-39; 1 John 3:9; John 10:28-29; Rom 11:29; Rom 8:30, and more.) Over and over and over again we see that God opens hearts (e.g. Acts 16:14), wakes the dead (e.g. Eph 2:4-7), sustains the weak (e.g. 2 Cor 12:9-10), and never loses (e.g. Rom 8:31-39). In every single case God succeeds.
Where, then, is the encouragement? It is in the sovereignty and success of God. He can raise the dead, open the heart's blind eyes, and remove a heart of stone and replace it with a living heart (Ezek 36:26). If He can keep you from sinning (Gen 20:6), He can guide loved ones through dark valleys, call the blind to Himself, and waken the spiritually dead. Scripture says, "After you have suffered a little while, the God of all grace, who has called you to His eternal glory in Christ, will Himself restore, confirm, strengthen, and establish you." (1 Peter 5:10) The encouragement? It's not all up to you. You are not the success or failure of the enterprise. That's God. And not one single lamb that He wishes to rescue will fail to be rescued (John 6:39). You may not have much hope for your world and you may be concerned about loved ones and you may certainly be at a loss to know what to do about it all, but you can be quite sure that God always accomplishes what He intends, and that includes the salvation and preservation of His own, even if they are, at a time, within the "gates of hell". The author of Hebrews says, "Consider Him who endured from sinners such hostility against Himself, so that you may not grow weary or fainthearted." (Heb 12:3) And Paul repeatedly encouraged his readers to not grow weary of doing good (Gal 6:9; 2 Thess 3:13). We can do that (not grow weary) because of Him who endured hostility, because He never fails.
 This "gates of hell" reference is not to "the place where the damned live", but the abode of the opposition to Christ as opposed to the kingdom of God. It is the place that Satan and his followers, human and demonic, feel safe, protected, defended against God. Jesus here isn't saying, "I will walk into the place of the dead and snatch some from it" like some second chance. He is saying, "There is no place that the god of this world can safely hold his people from Me."