The Bible speaks about the New Jerusalem having 12 gates, so why 12 gates? Does this relate to the old city of Jerusalem that originally had 12 gates?
A New Heaven and Earth
Looking at this present world, it’s easy to see that we need a new heaven and a new earth, and that’s exactly what we’re going to get. The Apostle John wrote, “I saw a new heaven and a new earth, for the first heaven and the first earth had passed away, and the sea was no more” (Rev 21:1), but that doesn’t mean a new heaven from which God reigns. The word heaven John uses simply refers to the universe, which includes the stars, planets, and beyond, so the new heavens and the new earth are coming; it’s just a matter of time, so what about this present universe? The Apostle Peter wrote, “by the same word the heavens and earth that now exist are stored up for fire, being kept until the day of judgment and destruction of the ungodly” (2 Pet 3:7), which speaks of God’s judgement as a fire, even the eternal fires of hell, but John also indicates that there will be no more sea. Does that mean the oceans and seas will have disappeared? What about the Sea of Galilee and the other seas around the world? It helps if we understand the way the Jews thought of the sea. To them, the sea were a symbol of death, so it may not necessarily mean the world’s oceans will disappear, but there will be no more death (Rev 21:4). If there are oceans and seas in the kingdom, they’ll have to be new ones, since Peter writes that “all these things are thus to be dissolved, what sort of people ought you to be in lives of holiness and godliness, waiting for and hastening the coming of the day of God, because of which the heavens will be set on fire and dissolved, and the heavenly bodies will melt as they burn” (2 Pet 3:11-12). Not only will there be new heavens and a new earth, John “saw the holy city, new Jerusalem, coming down out of heaven from God, prepared as a bride adorned for her husband” (Rev 21:2). That’s when the unimaginable will happen and “the dwelling place of God is with man. He will dwell with them, and they will be his people, and God himself will be with them as their God” (Rev 21:3).
Jerusalem was originally called “Salem,” and we read about the first mention of this city during Abraham’s life when he gave a tenth to Melchizadek, King of Salem, where it says, “Melchizedek king of Salem brought out bread and wine. (He was priest of God Most High)” (Gen 14:18). This was just after Abraham and his men had rescued Lot and his family and all their possessions, but whether this was the pre-incarnate appearance of Christ, we cannot say for sure as scholars are divided. Some believe it was Jesus (Psalm 76:2; Heb 7), while others believe that he was what the Scriptures say; “a priest of God Most High,” but that’s another article for another day. Israel thought of Jerusalem as the City of David because under his reign, the nation reached its greatest apex in history (for now), but eventually Israel (the Northern Kingdom with the Ten Tribes) and Judah (Southern Kingdom) fell into captivity, and Jerusalem was destroyed. Even though it wasn’t totally destroyed, Jerusalem has the “great” distinction among all the cities on the earth, for being one of the most volatile places on earth, having been destroyed more often than any other major city. In the city’s 3,000 year history, there have been over 100 conflicts, many of which left Jerusalem in rubble.
After Jesus’ Ascension, an angel told the Apostles and disciples that Jesus would return in the same way that He left (Acts 1:11), and coupled with the Messianic prophecy of Zechariah 14:4 that in the Day of Jesus Coming, the Mount of Olives will be split in half from east to west, the Church Fathers professed the belief that when Jesus returns He will enter Jerusalem through the Golden Gate or Eastern Gate. Sadly, in order to prevent the fulfillment of these Messianic prophecies, Suleiman the Magnificent sealed the portals of the Golden Gate or Eastern Gate in 1541 AD. The gate remains sealed to this day.
You who have followed me will also sit on twelve thrones, judging the twelve tribes of Israel.
When the Apostle John wrote about the new heavens and the new earth (Rev 21:1), he also saw “the holy city, new Jerusalem, coming down out of heaven from God, prepared as a bride adorned for her husband” (Rev 21:2), and then, “the dwelling place of God is with man. He will dwell with them, and they will be his people, and God himself will be with them as their God” (Rev 21:3), and since we will be in the presence of God, “He will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away” (Rev 21:4). Then John wrote, an angel “carried me away in the Spirit to a great, high mountain, and showed me the holy city Jerusalem coming down out of heaven from God, having the glory of God, it’s radiance like a most rare jewel, like a jasper, clear as crystal. It had a great, high wall, with twelve gates, and at the gates twelve angels, and on the gates the names of the twelve tribes of the sons of Israel were inscribed— on the east three gates, on the north three gates, on the south three gates, and on the west three gates” (Rev 21:10-13), so it is just as Jesus promised. The apostles would sit on 12 thrones, judging the 12 tribes of Israel, “and the wall of the city had twelve foundations, and on them were the twelve names of the twelve apostles of the Lamb” (Rev 21:14). The 12 gates were meant to let people, animals, water, and other supplies, in and out of the city, but also to keep some people out.
The gates of Old Jerusalem served functionally, like the Water Gate. It was near an underground spring and supplied the city’s water. In New Testament times, the Jews would enter Jerusalem for Passover through the Eastern Gate, which led to the Temple, and the same gate that Jesus entered Jerusalem through prior to His crucifixion and death at Passover. Jesus promised the apostles that they would be judges in the coming kingdom, saying, “Truly, I say to you, in the new world, when the Son of Man will sit on his glorious throne, you who have followed me will also sit on twelve thrones, judging the twelve tribes of Israel.in the nation Israel, and would sit as judges over the tribes of Israel” (Matt 19:28), but He has not forgotten us. Jesus says, “everyone who has left houses or brothers or sisters or father or mother or children or lands, for my name’s sake, will receive a hundredfold and will inherit eternal life” (Matt 19:29). We might not sit as a judge in the kingdom, but we will serve in some capacity, but one thing we’ll never have to worry about is the gates of the New Jerusalem will be shut in our face. They’ll be as open to us as the arms of a loving parent are to their own child.
Here is some related reading for you: Why Did God Choose Jerusalem to be the City of God? 
Resource – Scripture quotations are from The Holy Bible, English Standard Version® (ESV®), Crossway Bibles. (2007). ESV: Study Bible : English standard version. Wheaton, Ill: Crossway Bibles. Used by permission. All rights reserved.