4 “The Lord loves the gates of Sion more than all the dwellings of Jacob”. I have made the foregoing remarks, that you may not imagine the gates are one thing, the foundations another. Why are the Apostles and Prophets foundations? Because their authority is the support of our weakness. Why are they gates? Because through them we enter the kingdom of God: for they proclaim it to us: and while we enter by their means, we enter also through Christ, Himself being the Gate. And twelve gates of Jerusalem are spoken of, and the one gate is Christ, and the twelve gates are Christ for Christ dwells in the twelve gates, hence was twelve the number of the Apostles. There is a deep mystery in this number of twelve: “You shall sit,” says our Saviour, “on twelve thrones, judging the twelve tribes of Israel.” If there are twelve thrones there, there will be no room for the judgment-seat of Paul, the thirteenth Apostle, though he says that he shall judge not men only, but even Angels; which, but the fallen Angels? “Do you not know, that we shall judge Angels,” he writes. The world would answer, Why do you boast that you shall be a judge? Where will be your throne? Our Lord spoke of twelve thrones for the twelve Apostles: one, Judas, fell, and his place being supplied by Matthias, the number of twelve thrones was made up: first, then, discover room for your judgment-seat; then threaten that you will judge. Let us, therefore, reflect upon the meaning of the twelve thrones. The expression is typical of a sort of universality, as the Church was destined to prevail throughout the whole world: whence this edifice is styled a building together into Christ: and because judges come from all quarters, the twelve thrones are spoken of, just as the twelve gates, from the entering in from all sides into that city. Not only therefore have those twelve, and the Apostle Paul, a claim to the twelve thrones, but, from the universal signification, all who are to sit in judgment: in the same manner as all who enter the city, enter by one or the other of the twelve gates. There are four quarters of the globe: East, West, North, and South: and they are constantly alluded to in the Scriptures. From all those four winds; our Lord declares in the Gospel that He will call his sheep “from the four winds;” therefore from all those four winds is the Church called. And how called? On every side it is called in the Trinity: no otherwise is it called than by Baptism in the name of the Father, the Son, and the Holy Ghost: four then being thrice taken, twelve are found. Knock, therefore, with all your hearts at these gates: and let Christ cry within you: “Open me the gates of righteousness.” For He went before us the Head: He follows Himself in His Body....
5. “Very excellent things are said of you, thou city of God”. He was, as it were, contemplating that city of Jerusalem on earth: for consider what city he alludes to, of which certain very excellent things are spoken. Now the earthly city has been destroyed: after suffering the enemy's rage, it fell to the earth; it is no longer what it was: it exhibited the emblem, and the shadow has passed away. Whence then are “very excellent things spoken of you, thou city of God”? Listen whence: “I will think upon Rahab and Babylon, with them that know Me”. In that city, the Prophet, in the person of God, says, “I will think upon Rahab and Babylon.” Rahab belongs not to the Jewish people; Babylon belongs not to the Jewish people; as is clear from the next verse: “For the Philistines also, and Tyre, with the Ethiopians, were there.” Deservedly then, “very excellent things are spoken of you, thou city of God:” for not only is the Jewish nation, born of the flesh of Abraham, included therein, but all nations also, some of which are named that all may be understood. “I will think,” he says, “upon Rahab:” who is that harlot? That harlot in Jericho, who received the spies and conducted them out of the city by a different road: who trusted beforehand in the promise, who feared God, who was told to hang out of the window a line of scarlet thread, that is, to bear upon her forehead the sign of the blood of Christ. She was saved there, and thus represented the Church of the Gentiles: whence our Lord said to the haughty Pharisees, “Verily I say unto you, that the publicans and the harlots go into the kingdom of God before you.” They go before, because they do violence: they push their way by faith, and to faith a way is made, nor can any resist, since they who are violent take it by force. For it is written, “The kingdom of Heaven suffers violence, and the violent take it by force.” Such was the conduct of the robber, more courageous on the cross than in the place of ambush. “I will think upon Rahab and Babylon.” By Babylon is meant the city of this world: as there is one holy city, Jerusalem; one unholy, Babylon: all the unholy belong to Babylon, even as all the holy to Jerusalem. But he slides from Babylon to Jerusalem. How, but by Him who justifies the ungodly: Jerusalem is the city of the saints; Babylon of the wicked: but He comes who justifies the ungodly: since it is said, “I will think” not only “upon Rahab,” but “upon Babylon,” but with whom? “with them that know Me.”...
Source: The Enarrations, or Expositions, on the Psalms (New Advent)