The story of King Talut, Prophet David and Goliath is mentioned in the Glorious Quran as follows:

002.246  Hast thou not Turned thy vision to the Chiefs of the Children of Israel after 
(the time of) Moses? they said to a prophet (That was) among them: "Appoint for us a 
king, that we May fight in the cause of God."

He said: "Is it not possible, if ye were 
commanded to fight, that that ye will not fight?"

They said: "How could we refuse to 
fight in the cause of God, seeing that we were turned out of our homes and our 
families?" but when they were commanded to fight, they turned back, except a small 
band among them. But God Has full knowledge of those who do wrong.

002.247  Their Prophet said to them:

"God hath appointed Talut as king over you."

They said: "How can he exercise authority over us when we are better fitted than he 
to exercise authority, and he is not even gifted, with wealth in abundance?"

He said:

"God hath Chosen him above you, and hath gifted him abundantly with knowledge 
and bodily prowess: God Granteth His authority to whom He pleaseth. God careth for 
all, and He knoweth all things."

 

002.248  And (further) their Prophet said to them:

"A Sign of his authority is that 
there shall come to you the Ark of the covenant, with (an assurance) therein of 
security from your Lord, and the relics left by the family of Moses and the family of 
Aaron, carried by angels. In this is a symbol for you if ye indeed have faith."

002.249  When Talut set forth with the armies, he said:

"God will test you at the 
stream: if any drinks of its water, He goes not with my army: Only those who taste 
not of it go with me: A mere sip out of the hand is excused." but they all drank of it, 
except a few. When they crossed the river,- He and the faithful ones with him,- they 
said: "This day We cannot cope with Goliath and his forces." but those who were 
convinced that they must meet God, said: "How oft, by God's will, Hath a small force 
vanquished a big one? God is with those who steadfastly persevere."

002.250  When they advanced to meet Goliath and his forces, they prayed: "Our 
Lord! Pour out constancy on us and make our steps firm: Help us against those that 
reject faith."

002.251  By God's will they routed them; and David slew Goliath; and God gave him 
power and wisdom and taught him whatever (else) He willed. And did not God Check 
one set of people by means of another, the earth would indeed be full of mischief: But 
God is full of bounty to all the worlds.

002.252  These are the Signs of God: we rehearse them to thee in truth: verily Thou 
art one of the apostles.

(This text is taken from the English translation by Abdullah Yusuf Ali of the original Quran in Arabic.)