A last-minute try to replacement halfback and heir apparent Folau Fakatava sealed the stunning 35-30 victory.
The result robbed the Reds of just their second win in 27 years in Dunedin and left the injury-hit side in grave danger of missing the Super Rugby Pacific finals.
The Highlanders meanwhile kept their own play off hopes alive as they move into the top eight.
The Reds led 14-0 early then 27-14 early in the second half, but the Highlanders kept coming.
Victory would have sewn up a finals berth but the result leaves the Reds clinging on to eighth and all but needing a win in Fiji against the Drua to remain there and play finals.
The Reds hadn't won in Dunedin since 2013 - their only win since 1996 - but looked on song early when Liam Wright powered over in the seventh minute.
After conceding two early tries, the Highlanders got it back to 14-14 before Suliasi Vunivalu but the reds back in front on the stroke of halftime.
Connor Garden-Bachop's try put the hosts in front for the first time but the Reds brought it back to 30-28 with time running out for the hosts.
Enter Fakatava, on for Smith in the Japan-bound veterans final home game.
The mercurial Magpie made the most of his time, sneaking down the blind to score the match winner on the siren to the elation of the Dunedin crowd and an emotional Smith.