One of my college professors forever changed the way I look at the story in 1 Samuel 17. In my Bible, the heading says, "David and Goliath." And for years that it was I thought this story was all about - the epic battle between David and Goliath. But as my teacher (Phil Roberts) pointed out, the real contrast in this account is not between David and Goliath, but between David and Saul. Goliath is merely a foil to highlight this contrast.
Remember how Saul was described in 1 Sam. 9:2 and 1 Sam. 10:23? He was taller than anyone else in Israel. He was Israel's giant! Who better to take on the Philistine giant? Further, the very reason Saul was king to begin with was because the people wanted a king who would go out and fight for them (1 Sam. 8:20). They have their king, they have their battle. But their king has proven to be a coward. Indeed, Israel has the king it deserves. "When Saul and all Israel heard these words [of Goliath's], they were dismayed and greatly afraid" (1 Sam. 17:11).
Enters David. And the contrast between him and Saul could not be more stark. Saul was the tallest man in Israel; David was the smallest man in his family (the Hebrew word translated "youngest" in verse 14 also means "smallest"). Yet as soon as David heard the noise of a potential battle, he "ran" to see what was going on (v. 22).
The real contrast between David and Saul, of course, was not they looked like outwardly, but what their character was like inwardly. Saul demonstrated in the episodes in 1 Samuel 13 and 15 that he does not have the faith to obey God's word and trust in His promises. Ironically, Saul's estimate of David is pretty much the same as the heathen Goliath's - you are too young and too small to fight (compare 1 Sam. 17:33 with 17:42-43). David, on the other hand, was supremely confident that God could deliver Israel from this monster just as He had delivered his flock from predators (17:34-37). And that is exactly what happened.
There is an old expression that says "it's not the size of the dog in the fight; it's the size of the fight in the dog." What 1 Samuel 17 teaches is that it is not the size of a person's stature, but the power of the person's God, and the depth of the person's faith, that makes all the difference. Dagon was no match for Yahweh, and Saul's fear and Goliath's bluster were no match for David's faith.