This Psalm recounted the sufferings of a people: they have been persecuted, beaten, hated. But through it all there's a thread of hope - God is good. He has never allowed them to be defeated or their enemy to triumph over them.
The writer of this psalm makes reference to a history of persecution. From his earliest age his enemies have harassed him and treated him poorly.
But the writer is not disheartened. He acknowledges that even though he has gone through hard times he was never defeated. He was victorious because God is good.
God is good. And because He is, though we are persecuted by the enemy we will not be defeated.
We are pressed on every side by troubles, but we are not crushed. We are perplexed, but not driven to despair. We are hunted down, but never abandoned by God. We get knocked down, but we are not destroyed (II Corinthians 4:8-9).
Victory is ours because of our faith in the Heavenly Father.