Joshua 11:22 states that Anakim remained in Gaza, Gath, and Ashdod after the Israelite campaigns. Gath subsequently became one of the principal Philistine cities.
First Samuel identifies Goliath, the Philistine champion defeated by David, as a man from Gath. David later fled to Achish king of Gath while escaping Saul. During another period of flight, David and his followers lived under Achish's protection.
Gath continued to appear during the monarchy. Second Kings 12:17 records Hazael king of Aram capturing Gath before turning toward Jerusalem. Prophetic texts also include the city in warnings concerning Philistia.