City walls form a barrier one cannot penetrate, neither to enter nor to exit. Gates are the protected breaks in the wall through which a resident might exit the city (and return) or a visitor might enter the city (and leave). The gates came complete with doors that were commonly shut at night (and in moments of danger) and were typically guarded by soldiers. As the wall symbolizes the inviolable safety the Lord provides, the gates of necessity must symbolize access to that safety.
12 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