Goliath is a giant in the old biblical story David and Goliath and was depicted as the champion of the Philistines, traditional enemies of the Jewish people at that period of time. He makes his first appearance in the books of Samuel. His size varies depending on the translations from anywhere around 6 ft. 7 inches to over 9 ft, though modern depictions often have him at much more monstrous sizes.
In the story, Israel and the Philistines were at war and Goliath would emerge from his nation's tents daily to challenge the Jews to send their bravest warrior to defeat him and end the battle. However, they were too frightened of Goliath's size and strength to do so, and for over forty days, Goliath pretty much kept the battle at a stalemate.
This would change when the young shepherd boy, David, arrived with food for his older brothers. He accepted Goliath's challenge and slew the giant via tossing a rock into his forehead using his trusty sling, and then proceeded to behead the fallen giant with his own sword, causing the Philistines to flee. However, in some stories where he is defeated, Goliath does not suffer decapitation. An example would be his VeggieTales Self.
The tale of David and Goliath is often used to highlight how a man of faith can overcome impossible odds, much as David did when he slayed Goliath armed with nothing but a sling and stones and faith in God.
The story of David and Goliath may also represent Christianity overcoming the Pagan religions, with the young David representing Christianity and the brutal Goliath representing the Pagan world, and the stone David used to slay the giant may be considered a symbolism of the power of God in vanquishing all evils from the world.
Goliath was technically not a full villain as he was fighting with honor and for a cause he believed in, however he is considered an enemy of the Hebrew people and an open opponent of God - his denial of the ruling faith in the scriptures that feature him thus makes him a villain by its moral standards.
Goliath was parodied in the VeggieTales episode "Dave and the Giant Pickle", becoming a giant pickle. He is also not decapitated there.
Goliath has become a common name for any large and powerful male figure, much like "Hercules".