David realizes how God saved him from an earlier dangerous situation. There were enemies all around him in Gath. But God’s angels were surrounding him for his protection. That was the army of the Lord. Compare this with the situation in 2 Kings 6:8–17. When God opens the eyes of the servant of Elisha, he saw a mighty heavenly army around him and knew he was safe. And the Angel of the Lord—a term regularly used for when God himself came down to earth1 —is the commander of the army. Therefore it is said in Psalm 34:7 that he (his army) encamps those who fear him, and delivers them. That God is the commander of the heavenly army is also the meaning of his name Lord of hosts
(see 1 Samuel 17:45).
7 The angel of the LORD encamps around those who fear him, and delivers them.