Most scholars believe that it was the brother of Goliath who was killed by Elhanan. They base their belief on this verse that names Elhanan and the man he killed, and also tells that he was the brother of Goliath:
1 Chronicles 20:5 And there was war again with the Philistines; and Elhanan the son of Jair slew Lahmi the brother of Goliath the Gittite, whose spear staff was like a weaver’s beam.
1 Chronicles 20:5 And there was war again with the Philistines; and Elhanan the son of Jair slew Lahmi the brother of Goliath the Gittite, whose spear staff was like a weaver’s beam.

