Bernard Foley converted Michael Hooper's 79th-minute try to snatch the Waratahs a 32-30 win against the Stormers at Newlands in Cape Town.
The Stormers, who went into the game top of the South African Group table, appeared to have sealed victory when Jean-Luc du Plessis converted Pieter-Steph du Toit's touch down in the 76th minute, but Australia internationals Hooper and Foley had the last word.
Waratahs, seventh in the Australasian Group, had the advantage of playing against 14 men for the last 25 minutes after referee Michael Fraser had controversially shown winger Leolin Zas a straight red card for his challenge on Foley as the pair duelled for a high ball.
The Australians scored the game's first try through Kurtley Beale, while international team-mate Israel Folau, winger Reece Robinson and Hooper also went over. Veteran flanker Schalk Burger touched down for the Stormers and there were two tries for second-row Du Toit.
Waratahs fly-half Foley kicked three penalties and two conversions, while Stormers counterpart Du Plessis kicked 15 points courtesy of three penalties and three conversions.