South Africa had to win with a try-scoring bonus-point and a points' difference of at least 13 to progress to the semi-finals. Although they gave it their all, England scored the winning try five minutes after the hooter, consigning the Junior Boks to a fifth-place playoff against Argentina at 14h00 on Sunday in Cape Town.
England will take on Ireland (16h30), while New Zealand are up against France (19h00) in the semi-finals, also on Sunday at the DHL Stadium.
The SA U20s tried hard but in the process, made silly errors that cost them momentum, with the U20 Six Nations champions' strong defence a big reason for many of these mistakes.
The Junior Boks had an excellent start when their captain Zachary Porthen crashed over for a converted try in the seventh minute, exploiting early England mistakes in their own 22 to put the hosts ahead.
The South Africans had more possession and territorial advantage in the early exchanges, but England defended well and were tactically a bit more switched on too, slowly turning the tide to play most of the second quarter in the Junior Boks' half.
The home team were guilty of committing unforced errors and conceded way too many breakdown penalties - both on defence and attack - with the heavier England pack putting their South African counterparts under pressure, although the Junior Boks' tackling was solid.
England captain Finn Carnduff scored their first try shortly before the half-hour mark though, capitalizing on a South African lineout mistake and a resultant breakdown penalty to see the visitors pull level on the scoreboard, which is how it stayed until the break.
The visitors started the second half with their tails up when Joe Bailey crashed over from another strong lineout drive after they set up camp in the SA 22 from the restart, but the Junior Boks clearly came out with the intention to play, lifting their tactical kicking game a notch or two.
Six minutes later, it paid dividends as a clever grubber by Jurenzo Julius put Likhona Finca in space, with the speedster scoring after displaying some deft soccer skills. The conversion was unsuccessful, making it 12-12 with half an hour left in the match.
It stayed square on the scoreboard until the 86th minute, when England - after a period of sustained pressure in the SA 22 - clinched the game with a maul try by James Isaacs.
Scorers:
Junior Springboks 12 (7) - Tries: Zachary Porthen, Likhona Finca. Conversion: Liam Koen.
England U20 17 (7) - Tries: Finn Carnduff, Joe Bailey, James Isaacs. Conversion: Sean Kerr.