The English scored three converted tries and two penalty goals while Makazole Mapimpi dotted down his 20th try for the Boks, with Handre Pollard (5), Elton Jantjies and Frans Steyn contributing the rest of the points via penalty goals.
England went into the break with a deserved 17-12 lead, having done most of the attack and forcing the powerful South African scrum and lineout into uncharacteristic penalties. The hosts also managed to win the scraps back from their accurate kicking assaults, which further denied the Boks a decent attacking platform.
The home side scored two converted tries and a penalty goal to convert their first-half dominance into a five point lead, while Pollard slotted four successful penalty goals.
England were early out of the blocks with a well-worked try by midfielder Manu Tuilagi who dived over in the corner for the first try following a sustained period of pressure in the Bok half. Flyhalf Marcus Smith converted the difficult kick to give England an early 7-0 advantage.
However, the Roses suffered an injury blow immediately after that try when Tuilagi left the field and was replaced by Max Malins. Meanwhile, Pollard got the Boks on the scoreboard when he landed a penalty goal from the side of the pitch (7-3).
Lanky England fullback Freddie Steward scored his side’s second try just before the 20 minute mark when he was on hand to force his way over - the quick ruck and skip pass doing the damage this time - to stretch the usually rock solid Springbok defence. Smith added the extras to hand his side an 11-point lead.
However, Pollard then stepped up to add three more successful penalty goals to keep the South Africans in the game. But it was the English who made most of the attack and looked dangerous whenever they elected to go wide with the ball in hand.
Springbok midfielder Damian de Allende had to pull off a try-saving tackle before halftime on a flying Joe Marchant (wing) as England continued to pile on the pressure.
Pollard missed two penalty attempts in a row early in the second half as the Boks started to make their mark and the fresh replacement front row of Steven Kitshoff, Malcolm Marx and Vincent Koch was sent on to continue the forward battle in the second half, while Willie le Roux made way for Frans Steyn at fullback.
Pollard's last contribution was to slot his fifth penalty goal of the afternoon as he was replaced by Elton Jantjies, with the South Africans edging ever closer to the English lead with the score now 17-15.
With the Bok pack finally finding their rhythm, they forced a string of penalties, electing twice to turn down kicks at goal as they seek that elusive try. Jantjies nudged the Boks ahead for the first time on the hour mark.
However, after conceding the lead for the first time in the match England claimed it straight back when replacement scrumhalf Raffie Quirke ran a beautiful line to score his maiden Test try and his team's third of the match.
Replacement prop Will Stuart was sent to the sin bin for a repeated team offence and South Africa then scored their first try through Mapimpi, following a powerful maul from an attacking lineout. Jantjies missed the conversion, but the Boks were soon in front again when Steyn landed a trademark long-range effort to take the score to 26-24 with just a few minutes remaining on the clock.
In a frantic end to the match, Bok skipper Siya Kolisi was yellow carded as he attempted to win a high ball, only succeeding to tackle the English opponent in the air.
Smith had the last say when he kicked the winning penalty in front of an ecstatic Twickenham crowd.
Springboks 26 (12) – Try: Makazole Mapimpi. Penalty goals: Handre Pollard (5), Elton Jantjies, Frans Steyn.
England 27 (17) – Tries: Manu Tuilagi, Freddie Steward, Raffi Quirke. Conversions: Marcus Smith (3). Penalty goals: Smith (2).