New Zealand held a 12-0 lead at the break but the South Africans erased the deficit early in the second half with tries by Seabelo Senatla and Cecil Afrika that were converted by Branco du Preez.
A penalty by Du Preez and a try by Cornal Hendricks completed the scoring for the Blitzbokke.
VIDEO: Tokyo final, SA v NZ, highlights
Gillies Kaka, Tim Mikkelson and Ben Lam scored tries for series leaders New Zealand, who hold a 32-point lead over South Africa in the standings with two rounds remaining.
It was South Africa's second win of the series following a 40-21 win over New Zealand in the final of the Las Vegas Sevens in February.
"It's is not every day you beat New Zealand twice in the final," South Africa head coach Paul Treu said. "Every win you have to take, and we can go back to South Africa as a happy team."
South Africa beat France 14-12 in the semi-finals and New Zealand advanced with a 35-17 win over Australia.
Last year's Tokyo Sevens winners, Australia, finished third, crushing France 31-7.
The next round is on May 4-5 in Glasgow, Scotland.
Scorers in final:South Africa:
Tries: Seabelo Senatla, Cecil Afrika, Cornal Hendricks
Conversions: Branco du Preez (3)
Penalty drop: Du Preez
New Zealand:
Tries: Gillies Kaka, Tim Mikkelson, Ben Lam
Conversions: Rocky Khan, Kaka
Results from the Tokyo Sevens, the seventh leg of the IRB world series:
Cup
Quarter-finals
France 14, Scotland 10
South Africa 19, Samoa 12
New Zealand 19, United States 12
Australia 21, Fiji 12
Semi-finals
South Africa 14, France 12
New Zealand 35, Australia 17
Third Place
Australia 31, France 7
Final
South Africa 24, New Zealand 19
Plate
Semi-finals
Scotland 21, Samoa 17
United States 21, Fiji 19
Final
United States 17, Scotland 0
Bowl
Quarter-finals
Wales 22, Japan 14
England 40, Portugal 0
Kenya 17, Canada 5
Argentina 14, Spain 0
Semi-finals
England 21, Wales 19
Argentina 12, Wales 10
Final
England 38, Argentina 0
Shield
Semi-finals
Canada 38, Spain 0
Japan 19, Portugal 15
Final
Canada 27, Japan 14
Standings: (After 7 of 9 legs)
1. New Zealand, 132 points 2. South Africa,
100. 3. Fiji, 98 4. Samoa, 94 4. 5. France, Kenya, 77. 7. Wales 68. 8.
Australia, Argentina 62. 10. England, 58.