England took five wickets after tea on the second day at Newlands and South Africa was 215-8 at stumps and still 54 runs behind England's first innings of 269 all out. South Africa lost those five wickets for just 58 runs.
Veteran fast bowlers Stuart Broad and James Anderson were impressive with five wickets between them but England's most important breakthroughs after tea were produced by 21-year-old seamer Sam Curran and 22-year-old spinner Dom Bess.
Bess helped to turn the tide in Cape Town when opener Dean Elgar skied a catch to England captain Joe Root at deep mid-off to be out for 88. That broke a 117-run stand between Elgar and Rassie van der Dussen (68) that threatened to make it South Africa's day.
Curran followed up to remove danger man Quinton de Kock (20) and van der Dussen in the space of four overs and nine runs and England was ahead and in sight of a crucial first-innings advantage.
"We reaped the rewards towards the end of the day," Curran said. "No wickets in the middle session but we knew the rewards would come if we stuck at it ... I think all in all a good day.
"Hopefully we can bat big and try and win this game."
South Africa leads the series 1-0. England hopes to level it with two to play.
Anderson capitalized on England's dominance late in the day to add the wickets of tailenders Dwaine Pretorius and Keshav Maharaj with the new ball.
Pretorius edged to second slip to give Ben Stokes his fourth catch of the day, one off equaling the world record for catches for a non-wicketkeeper fielder in an innings. Numerous others went in his direction but either fell short or just wide of him, to his frustration. He also dropped a tough chance off van der Dussen.
Maharaj's dismissal to Anderson ended the day's play and England's Barmy Army of supporters sang and chanted as the players left the field. Stokes applauded them for their efforts. England's players deserved applause, too.
England had fought its way back into the test, and maybe the series, after being rocked by a run of misfortune on this tour: 11 England players fell ill with a flu-like virus before or during the first test. England lost that game by 107 runs. Opening batsman Rory Burns and fast bowler Jofra Archer were then ruled out of the second test after picking up injuries in training.
After resuming on 262-9, England was bowled out for 269 at the start of the second day for what appeared a sub-par total on a good batting strip.
But Broad and Anderson injected new life into a seemingly ailing England with three quick wickets to leave South Africa on 60-3 at lunch.
Elgar and van der Dussen responded. Elgar gritted it out in typical fashion with 10 fours and van der Dussen registered a second half-century in his first two tests.
The turning point came with Elgar's decision to go after spinner Bess soon after lunch. It resulted in a miscue and a catch to Root, who celebrated by screaming out in joy and pumping his hand against his chest.
The breakthrough was that meaningful.
"Bitter disappointment," Elgar said. "We grafted and fought so hard to get ourselves into a reasonably good position just to let it slip in that last hour."
Curran kept England in the ascendancy with a cleverly disguised slower ball that tricked de Kock and saw him hole out to Anderson, also at mid-off.
Van der Dussen survived four clear chances in his eventful innings: He was given out lbw but successfully reviewed the umpire's decision. He was caught off a Broad no-ball. He was dropped in a tough chance low to his right for Stokes in the slips and also saw another edge drop just short of Stokes.
Stokes had the last laugh with a diving catch to his right to finally see off the stubborn van der Dussen and give Curran two crucial wickets in his 2-39.
Both teams are fielding inexperienced batting lineups and the series may just come down to which one of them finds its feet quickest.
Compared to the nearly 300 tests of experience of England's opening bowlers Anderson and Broad, the top three English batsmen had only 15 appearances between them coming into the game. Add to that No. 6 Ollie Pope, who ended 61 not out to top score in England's first innings, is playing just his fifth test.
South Africa's batting also has its own group of newcomers that includes debutant Pieter Malan, new No. 3 Zubayr Hamza, and van der Dussen at No. 5, who made his debut in the first test.