Kournikova, very much the crowd's darling, and Gagliardi, higher ranked and the doubles winner here last year, went head-to-head in a desperate quarter-final.
Gagliardi, the third-ranked Swiss player on the Sanex WTA Tour behind Martina Hingis and Patty Schnyder, took the early initiative, racing to 3-1 and 5-2 before serving out the first set at 6-2 in 40 minutes.
The second set was a 43-minute classic played in temperatures of about 36 degrees.
Kournikova held serve in the first game but then, hindered by a couple of double faults, managed just one point in falling 1-2 behind. Gagliardi sensed a chance. At 4-2 it got bigger.
But Kournikova, to cries of "go Anna, c'mon Anna" from the crowd, lifted her game. She came back from 15-40 in the eighth game to level at 4-4 with a great cross-court shot which gave Gagliardi no chance.
Down 30-40 and twice taken to advantage, Kournikova got up to win the next game for 5-4.
The 10th game was perhaps the turning point. Gagliardi, serving, swept to 30-0. A lucky net cord went Kournikova's way. She got to 30-30 and then deuce. But she then squandered two set points before grabbing the winner and the set.
The third set was more of the same, with Kournikova mixing the unforced errors with clean winners as they traded games to 3-3.
At 4-3, Kournikova then broke Gagliardi for 5-3, only to hand that advantage straight back. At 5-5 it was wide open. Kournikova went ahead 6-5, dropping only one point on serve. At 15-40 in the next she had two match points. Gagliardi saved one, but when she pushed an attempted passing shot into the net, it was over.
"I was happy with the way I played," Gagliardi said. "You know when you play Anna you will have a hard match. I think we put out a good match. I think the crowd enjoyed it.
"Yes, I should have closed it out in the second set. She came out more determined in the third and became more aggressive. I became less aggressive. I don't know why."
Asked about some doubtful line calls, Gagliardi said: "I've been on the chair. I know how hard it is."
Kournikova now faces Israeli Anna Smashnova in the first of today's semifinals, with 300 tickets going on sale at 11 am.
"Emmanuelle was playing really good in the beginning," Kournikova said. "I was trying to find a way to break up her game and not make so many mistakes. I was not thinking negative. I wanted to be positive.
"I was pretty tired at the end of the third set. I'm fine now. This match meant a lot to me. I knew I could go past two hours."
Third on court, qualifier Silvija Talaja (Croatia) continued her giant-killing run with a 6-4, 7-5 win over Tatiana Poutchek (Belarus).
"It was my sixth match in six days, but I felt better than I did yesterday," said nte Talaja, who was ranked 18th in the world in 2000 before injury forced her down to a season-ending 109 last year.
"It is my first time here, but I'll be back . I love Auckland.
"My body is holding up. It is the first time I have played six matches in six days."
Talaja found Poutchek's desire to slow the game down frustrating, but was more annoyed with her serve which she tagged as "terrible."
She will meet the only remaining seed, No 5 Tatiana Panova, in the other semifinal.
After being up 4-1, Panova, from Russia, eventually took the first set 7-6 (9-7) over third seed Anne Kremer, of Luxembourg, then went on to capture the second 7-5 to complete victory in just over two hours.
Today's schedule. -
All centre court. From noon, singles semifinals: Smashnova v Kournikova, Talaja v Panova. Doubles semifinal: Nicole Arendt/Liezel Huber v Tatiana Panova/Tatiana Poutchek.
ASB Bank Classic full coverage
Players list and profiles
Singles draw
Ticket information
Anna Kournikova picture gallery
ASB Bank Classic picture gallery
Related sites
Heineken Open full coverage
Tournament information
Tournament schedule
Players list and profiles
Ticket information
TV coverage
Related sites
From the sidelines: other news related to the tournaments