Psalms - Chapter 64
Daniel in the Den of Psalms
According to the Midrash, this Psalm refers to events in the Book of Daniel, specifically chapter 6. In that chapter, prayer to G-d was prohibited by law. Despite this, Daniel continued to pray to G-d and was thrown into the lions' den. (He was saved by Divine intervention.)
David asks G-d to hear of his troubles and to rescue him from those who would do him in. David asks to be concealed from the plot of evil people. Their tongues are weapons against innocent people. They feign sincere concerns, but they are secretly laying traps. (This portion of the Psalm parallels the officers who conceived of the ban on prayer specifically to entrap Daniel.)
G-d then overturns the plans of the wicked and trips them up with their own plots. Everyone who witnesses this will deride them in their fallen state. People will be drawn to be in proper awe of G-d and they will understand that He rewards and punishes people based on their actions. The righteous will rejoice and place their trust in G-d. (This part of the Psalm refers to Daniel's salvation from the lions and its aftermath, in which Daniel's enemies met the fate they had planned for him and Darius recognized and praised G-d.)