“Gath…Ashkelon.” Two of the 5 capital cities of the Philistines, which were Gaza, Gath, Ekron, Ashkelon and Ashdod (cp. Josh. 13:3; Judg. 3:3; 1 Sam. 6:16). It is almost certain that in this poem of David, Gath and Ashkelon are mentioned as a synecdoche of the part, the part (those two cities) being put for the whole (the whole area controlled by the Philistines). David did not want any Philistines anywhere to rejoice, not just in those two cities.
“the daughters of the Philistines.” The reference to the daughters is because when the men went out to war, the women would anxiously wait, hoping that their men would come home, and better, come home completely victorious. When the men did come home safe, there was great rejoicing. In this battle between Israel and the Philistines, the Philistines had a resounding victory and there would have been much rejoicing throughout the Philistine cities, and David laments that fact.