We know that at one time or another, a collection of Psalms existed entitled "The Songs of Zion." Evidently these songs were sung from the ramparts of Jerusalem as she held her own under military siege. That's about all we know about this legendary collection, but it wouldn't surprise me to find that Psal 9, or some precursor, was included in the lot.
Psalm 9 is a song with clear military overtones, extolling a God who grants victory in battle to his chosen. The psalm praises God for past victories and calls for divine intervention in the battle at hand.
As an act of worship, we use the psalm as a reminder of God's presence and power. "Greater is he who is in you than he who is in the world." Since most of us don't face panzer tanks and bazookas on a daily basis, we can rest assured that the power and providence of God is ample to the challenges of our lives.
Tucked away in a quiet corner of the psalm, though, we find an interesting bit of theology. While the poetic language of the psalm generally seems to suggest that God is expected to intervene with lightning bolts and claps of thunder, striking dead the enemy troops,, verses 15 and 16 paint a subtler picture. The enemies of God become the victims of their own devices.
If you haven't read the book of Esther for a while, take a look at it this week and you'll see an example of this sort of thing. Or look at the story of Gideon in the book of Judges. I don't doubt we could come up with countless other examples. The underlying theology seems to be that, given enough rope, the enemy will hang themselves. Their pride, ambition, and bloodthirstiness will eventually cause them to self-destruct.
The psalmist is actually not calling for gad to be vengeful so much as for the natural consequences of the enemies rebellion to be hastened.
This is an important reminder to each of us that sin (rebellion against God) doesn't necessarily require vengeance from a tyranical God. Left to its own devices, sin will destroy itself. Only the intercession of a graceful God can make a difference.