She served for the match at 5-4 in the third set but was broken by Davis, who later held three match points when leading 11-10 only for her opponent to fight back to level in the 22nd game.
Having never played a match so lengthy, the Romanian faces a huge challenged to recover before Monday's fourth round against either Ash Barty or Naomi Osaka. "I'm nearly dead", she said.
Halep nows plays either 18th seed Ashleigh Barty of Australia or Japan's Naomi Osaka in the last 16 after nearly four hours of incredible action - the longest match of the women's tournament so far.
BC-TEN-Australian Open, 5th Ld-Writethru, 608 Long haul: No. 1 Halep fends off Davis in 3:45 marathonAP Photo MEL233, MEL232, MEL209, MEL126, MEL118Eds: Updates with detail.
The Romanian world number one, suffering with ankle problems, finally managed to serve out at the fourth time of asking after three hours and 44 minutes of incredible action that brought a standing ovation from Rod Laver Arena.
Dow closes above 26000 for first time in history
The Dow first hit 26,000 Tuesday, 12 days after it hit 25,000 - the fastest run between 1,000-point milestones in history. The S&P 500 gained 26 points, or 0.94%, to 2,803 - a record closing high - with staples and tech rising more than 1%.
"I just feel that my muscles are gone".
Halep conceded she could not feel her dodgy ankle by the end of the match, which she injured in the first round of the tournament. "It was nice to win this match".
Davis, a baby-faced 24-year-old with a monster forehand, was majestic in defeat, breaking Halep three times when the Romanian served for the match and battling on after losing a toenail late in the game.
Pliskova beat No. 29 Lucie Safarova in straight sets, 7-6 (6), 7-5 while Garcia bested Aliaksandra Sasnovich, 6-3, 5-7, 6-2.
Davis, flying the American flag alongside Madison Keys following early exits for Venus Williams, US Open champion Sloane Stephens and Coco Vandeweghe, went toe-to-toe with Halep, who won the pair's previous meeting at Indian Wells in 2013. I was very happy I could stay and win it.