You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
England fashioned excellent early tries for Manu Tuilagi and Freddie Steward but were penalised relentlessly - 18 times in the match.
The Springboks edged clear via the tee in the second half and, after tries by Raffie Quirke for England and Makazole Mapimpi for the Springboks, a Fran Steyne penalty put the visitors two points ahead with six minutes to go.
England, though, having barely featured in the second half, mustered one final attack and earned a penalty on the 22 that Smith smashed over.
"The last time we played South Africa I was watching in a student bar," said fullback Steward after his second successive man of the match performance.
Smith added: "It was mental, having to wait so long. The referees were checking the TMO. It made it more nerve-racking. The boys around me backed me.
"Once I hit the kick it was like slow motion. It was so emotional for me. To properly celebrate at the end was amazing. This group will never forget that day."
England got off to a flier with a superbly worked try after seven minutes as Smith and Henry Slade combined to send Tuilagi over in the corner - though the big centre had to go off immediately after with a knee injury.
England continued to put the ball through the hands and created another excellent score when Steward, looking assured in his fifth international, blasted through three defenders to reach over the line.
South Africa showed little in attack but, as ever, stayed tenacious at every contact, earning a succession of Handre Pollard penalties to keep them in touch.
England just about held their own in the highly-anticipated scrum battle, even when South Africa sent on the Bomb Squad full replacement front row five minutes after the restart, but though the Boks forced two more penalties, Pollard sent them both wide.
A week ago England cashed in on Australia conceding 18 penalties but on Saturday it was the other way and Pollard rediscovered his radar as England’s attack dried up.
A fearsome 35 metre rolling maul earned yet another penalty, though for once the world champions opted against the kick that would have put them ahead and paid the price when a desperate tryline wrestle by Max Malins held up Kwagga Smith on the line.
They did not repeat the mistake when England offended again in front of the posts and replacement Steyne slotted it over to edge the Springboks a point ahead.
That lasted less than a minute though as Joe Marchant cut through to feed replacement scrumhalf Quirke to mark his second cap by diving deliriously over the line.
Another South African maul set up Mapimpi for his try and a Steyne three pointer took them 26-24 ahead.
A yellow card for Springbok captain Siya Kolisi for a high tackle set up a tense last five minutes and, roared on by a home crowd desperate for a final surge, England delivered it, earning a straightforward shot that the nerveless Smith nailed.
It was a fantastic match to end England's autumn following wins over Tonga and Australia.
"Our young guys will learn so much in a test like that where South Africa keep coming at you with that intensity and you learn what test rugby is about," said England coach Eddie Jones. "That's a proper test tonight - I'm really pleased."
It was a disappointing end for South Africa's tour, after wins over Wales and Scotland.
"It was a pity that we couldn't finish strong but I'm proud of the way the boys pushed up even when we made a few mistakes," said Kolisi.
"We never make excuses, we will take it in our stride as we are grateful that we get to play this game of rugby - it's been a tough year."