Guptill's half-century at the top of the order sent the New Zealanders to 177-7 in 20 overs batting first at Supersport Park in Centurion. South Africa could only manage 145-8 in reply, with spinners Nathan McCullum and Ish Sodhi and quick bowler Mitchell McClenaghan all chipping in with two wickets each for New Zealand.
The victory clinched a share of the series for the Black Caps and gives them a boost ahead of a three-game one-day international series.
Opener Guptill struck six fours and three sixes to be the only batsman on either side to really get going. Captain Kane Williamson supported with 25 in their opening partnership of 52, and James Neesham had 28 from 19 balls from the middle order.
South Africa's chase faltered as it lost its top three for just 47 runs inside seven overs. Morne van Wyk fell in the third over, Hashim Amla was out for 14 in the fourth over and stand-in captain AB de Villiers was one of McCullum's wickets when he tried to swing the spinner away for six and was caught down at long-on for 15.
Farhaan Behardien top-scored for South Africa with 36 from 33 balls, but his partnership of 37 with David Miller was the only real resistance from the Proteas.
McCullum removed Behardien off a full toss when the batsman tried to slog it to midwicket and sent a catch straight to Guptill. New Zealand was in control from then on.
South Africa crushes New Zealand by 159 runs in 3rd ODI