The Scots trailed 26-15 with 30 seconds left but Edinburgh wing Dougie Fife scored twice - the second in added time - to clinch a thrilling 27-26 win.
Scotland upset England 17-0 in the quarter-finals before beating USA 24-17 in the semis to reach a first final.
Fiji secured the overall title when they reached the last eight in London.
Scotland's previous best finish in a World Series event was fourth.
Their squad included four players - Jamie Farndale, Gavin Lowe, Scott Riddell and Mark Robertson - named in the wider 25-man Great Britain squad that will gather on 30 May for an intensive seven-week training block to compete for the 12 Olympic places available in Rio.
South Africa grabbed an early lead in the final via Seabelo Senatla but tries from Farndale and captain Scott Wight saw the Scots lead 10-7 at half-time.Converted scores from Roscko Speckman and Cecil Afrika put South Africa in control at 21-10 before Scotland's James Fleming made it 21-15, but Speckman's second try appeared to have sealed it.
But Fife, who has won six Test caps for Scotland, pounced with 25 seconds left and, after South Africa failed to retain possession at the kick-off, sprinted over again in added time to clinch a dramatic victory.
"It is just an unbelievable feeling," said Fife, 25. "This team have come a long way and we believe we can beat anyone on our day. I think we surprised a few people today."
"It has probably not sunk in yet," said captain Wight. "We were a long way behind in the final, but we stuck to task and got there in the end.
"We had pictures up in the team room showing how close we were in Kenya and Singapore this year. We just said 'believe in one another'."
England, who topped their pool after wins over Fiji, Australia and Wales, were beaten 35-10 by New Zealand in the Plate semi-finals after their last-eight loss to Scotland in the main event.
"Today is very tough to take," said head coach Simon Amor. "Scotland are a good team and you can't afford to give them time and space with the ball.
"They moved us around brilliantly, we couldn't get our hands on the ball, and in sevens possession is everything."
Wales lost all three pool matches on Saturday, but won the Bowl final 24-19 against Australia, after earlier wins against Kenya in the quarter-finals and Canada in the semis.