The ongoing wars with the Philistines repeatedly brought the Israelites face-to-face with towering giants. In one such battle, one of David's elite warriors, Elhanan the son of Jair, steps forward to confront Lahmi, the brother of the infamous Goliath [רש"י]. Despite the giant's massive proportions, the Israelite warrior strikes him down and secures the victory [ביאור שטיינזלץ].
A historical puzzle surrounds this event, as a parallel historical account claims that Elhanan killed Goliath himself. The primary approach among commentators is that this record clarifies the earlier one. Since David famously killed Goliath, it was actually the brother, Lahmi, who fell to Elhanan, though Elhanan may have had David's help in the mission [רד"ק]. Because Lahmi was as colossal as his brother, and his defeater hailed from Bethlehem just like David, a popular folk saying emerged claiming that the Bethlehemite killed Goliath [מלבי"ם].
Alternatively, some traditions identify Elhanan as King David himself. In this view, the name Elhanan indicates that God favored him, while the name Jair hints at the future Temple [רש"י, רד"ק]. Another perspective suggests that the Goliath mentioned here is simply a different person altogether, not the famous Philistine defeated in the Valley of Elah, because he is not listed among the specific descendants of the giants mentioned in this context [רש"י].
The sheer terror of the giant is captured by his weapon. The wooden shaft of his spear [מצודת דוד] was so incredibly long and heavy that it resembled a weaver's beam—the thick, round wooden cylinder used to hold threads during the weaving process [רש"י, מצודת ציון, ביאור שטיינזלץ]. Wielding such a massive object required towering height and terrifying physical power [ביאור שטיינזלץ]. Yet, this weaving comparison carries a deeper poetic justice. The family of the man who struck down the giant was intimately connected to the sacred craft of weaving. Whether the victor was David, whose mother wove the curtain for the sanctuary, or Elhanan, who descended from the master artisan Bezalel, it was perfectly fitting that a family dedicated to holy weaving would be the one to defeat a giant whose weapon mirrored a weaver's tool [רש"י, מלבי"ם].