What does Psalm 129:5 mean?
This is the beginning of the "imprecatory" section of Psalm 129. Imprecatory psalms call for the Lord to deliver some specific harm to an enemy. Most are similar to the requests in this psalm (Psalms 17:13; 35:4–6). Other imprecations (Psalm 58:6–9; 137:8–9) are much more destructive.Zion is a symbolic name for the city of Jerusalem (2 Samuel 5:7; 1 Kings 8:1). Both names can also serve as references to the nation of Israel (Psalm 14:7; Zephaniah 3:14; Zechariah 8:14–15). This follows the pattern used even today, where the capital city is often a byword for the entire nation, such as "Washington" for the USA or "Moscow" for Russia. Those who hate Jerusalem probably don't despise the buildings and walls. Rather, this verse speaks of those who hate the Jewish people. The prayer offered is that those who despise the nation of Israel would suffer humiliation and defeat.
A vivid example of this happening very literally came when the Assyrian general Sennacherib attempted a siege of Jerusalem. The Lord delivered a prophecy against Sennacherib through Isaiah (2 Kings 19:28). This prophecy came true when God killed thousands of Assyrian troops overnight (2 Kings 19:35), forcing them to retreat (2 Kings 19:36). The mocking enemies who resisted Israel's rebuilding of Jerusalem (Nehemiah 4:1–4) were also embarrassed when the project was successful (Nehemiah 6:15–16).