With the tie seemingly heading towards a goalless draw, Braintree's Anthony Edgar thought he had won the game for his side when he fired home from outside the box in the last minute, only for Billy Waters to level things up deep into injury time.
New Torquay boss Kevin Nicholson thought his side had salvaged a precious draw in their attempts to move away from the relegation zone when James Hurst grabbed his second of the evening to level the game at 2-2 just two minutes from time.
However, Stefan Payne broke the home fans' hearts when he netted two minutes into injury time to ensure all three points would go the way of the Whites.
At the other end of the table, Halifax Town moved a step closer to safety as two goals from Jordan Burrow, his eight and ninth of the season, and a late Kingsley James penalty were enough to see off Altrincham 3-1.
There were also big wins for Macclesfield Town, who moved away from trouble with a 3-0 win over Guiseley thanks to goals from Paul Turnbull, Danny Whitehead and Danny Whittaker, while Barrow also moved up the league with a 3-2 victory against Chester FC thanks to a Niall Cowperthwaite winner 13 minutes from time.
Elsewhere, bottom side Kidderminster Harriers recorded only their seventh point of the season with a 1-1 draw against struggling Boreham Wood, and Bromley moved into the final playoff place as goals from Ali Fuseini and Jack Holland were enough to beat Welling United 2-1 at Park View Road.
Results in full (half-time scores in brackets): Altrincham 1-3 Halifax Town (0-1), Barrow 3-2 Chester FC (1-1), Cheltenham Town 1-1 Braintree Town (0-0), Grimsby Town 2-1 Gateshead (1-1), Guiseley 0-3 Macclesfield Town (0-2), Kidderminster Harriers 1-1 Boreham Wood (1-0), Torquay United 2-3 Dover Athletic (1-1), Welling United 1-2 Bromley (1-1), Wrexham 2-2 Tranmere Rovers (1-1).