England reached 162 for four at tea, 151 runs behind South Africa's first innings total of 313.
Kagiso Rabada took two for 31 as South Africa's four-man pace attack -- all bowling at more than 140kmh -- reduced England to 91 for four.
Root and Stokes counter-attacked, posting a fifty partnership off only 35 balls. Their stand was worth 71 at tea.
Root made 60 not out, reaching the first half-century of the match off 77 balls with nine fours.
More From This Section
But in the next over Stokes pulled a short ball from Rabada for six. He added six fours as he hurried to 38 not out off 31 balls at tea.
England got off to a bad start when Rabada had Alex Hales caught at second slip for one. It got worse when Hardus Viljoen took a wicket with his first ball in Test cricket, having England captain Alastair Cook caught down the leg side by wicketkeeper Dane Vilas for 18.
James Taylor was caught at short leg off Morkel for seven.
Stuart Broad, James Anderson and Ben Stokes took a wicket apiece as South Africa added 46 runs to their overnight total of 267 for seven.
Wicketkeeper Jonny Bairstow took six catches and missed a chance to equal the world record of seven when he dropped last batsman Morkel.
All of the South African batsmen reached double figures - the 13th instance in Tests. It was the lowest total in which it had been achieved.
Stokes finished with the best English figures of three for 53.