Atletico bounced back with two goals early in the second half to put Dortmund on the ropes before they dug deep to complete a superb comeback
Azarenka, playing in her second tournament after the birth of her son Leo in December, out-hit and out-thought the second-seeded Romanian for much of a pulsating first set, mixing deep groundstrokes with frequent dropshots and forays to the net.
But the two-time semi-finalist at the All England Club began to flag in the first-set tiebreak, losing it 7-3 before conceding the next five games.
A mini fightback pegged the second-set deficit back to 5-2 before another Azarenka backhand groundstroke error saw Halep home in just under 90 minutes, keeping alive the Romanian's hopes of a maiden Grand Slam victory and an ascent to the world number one ranking.
Halep will face Britain's Johanna Konta in the quarter- finals.