Moeen was the pick of the bowlers with four wickets, while Dawson, Anderson and Stuart Broad chipped in with two wickets apiece.
Bavuma was unbeaten on 48 and South Africa trailed by 244 runs on 214-5, facing an important morning's play on Saturday against the new ball.
This match saw Ali become the fifth quickest player, in terms of matches played, to complete the all-rounder's double of 2,000 Test runs and 100 wickets.
JP Duminy also departed cheaply and once Hashim Amla was trapped lbw by Liam Dawson, it was only a matter of time.
Having won the toss and choosing to bat, England were reduced to 17 for two and then 76 for four before Root, in partnership with Ben Stokes (56) and then Moeen Ali (61no), led them to 357 for five at the close.
Thirteen balls later Elgar was on his way for two when Moeen took a hard-hit return catch.
His partner enjoyed a little more fortune, seeing Moeen spin a ball behind his legs but over the stumps on 2 and surviving a review against Mark Wood on 31, when the ball was shown to be only clipping leg stump.
The visitors reply got off to a bad start when Heino Kuhn made just one before edging a Broad delivery to first slip, and former captain Alastair Cook made no mistake with the catch.
Next man in Moeen Ali played himself in and did not let another wicket fall.
Meanwhile, South Africa coach Russell Domingo has once again left the tour to be with his mother, who is seriously ill.
Moeen then removed South Africa captain Dean Elgar, who had been holding the innings together, for 54 when the opener was caught off bat and pad by Gary Ballance at short leg. Elgar's exit left the Proteas in trouble at 98 for three.
The live broadcast of Day 4 of England vs South Africa 1st Test match will start at 3.30 PM (IST).
The first task is obviously to avoid the follow on although it is unlikely that Root will explore that option with the pitch already providing substantial assistance to the spinners from the second day and the odd delivery keeping low as well, although admittedly large from the bowler's rough outside thee line of the stumps.
But it was Dawson who ended the match when Morne Morkel holed out to South Africa-born Keaton Jennings in the deep. It took a pair of ticklish stands featuring Broad to get them there, however, as South Africa surged back into contention with the second new ball. At 314-8, South Africa's lunch had soured.
Philander had earlier scored a gritty 52 at number nine to eke out vital runs onto the Proteas total but before he scored a run he was hit on the right hand by a James Anderson delivery.
Gary Ballance strolled to the crease with England 80-1 and batted assuredly into the evening, with some handsome strokes to get off the mark.
Johanna Konta breezes into Wimbledon fourth round
But it felt as though the crowd wanted a battle, and the Italian provided it, winning the second set. "But a very slow animal". The temperature soared toward 85 degrees (near 30 Celsius) after being in the low 70s (20s Celsius) the prior two days.