The American 15-year-old has been one of the stories at Wimbledon after coming through qualifying and beating Venus Williams.
But despite the support of the Court 1 crowd, former French Open champion Halep never allowed the 15-year-old into their fourth round match.
Gauff, who appeared to be holding her stomach, needed treatment and took a tablet at the start of the second set.
She saved two match points but world No.7 Halep, who reached the semi-finals here in 2014, used her greater experience to win 6-3 6-3 to reach the Wimbledon quarter-finals for the fourth time.
Gauff, who can only play five more tournaments this year because of her age, has the consolation of £175,000 in prize money.
BBC commentator Tracy Austin, who won the US Open aged 16, said: Her fairytale ends here at Wimledon but it will continue. She has all the ingredients to be a Grand Slam champion.”
Halep, who will next face Shuai Zhang of China, said: “I am really happy I can play again in the quarter-finals here. It is one of my favourite tournaments.
“It is very special. I felt the energy on court today and I am happy I could play my best tennis.