Pakistan were 243 for seven at tea on Sunday, an overall lead of 139.
Harris (three for 46) and seamer Shaun Pollock (two for 32) kept the Pakistan batsmen under pressure and reduced the tourists to 199 for seven with all their recognised batsmen dismissed.
South Africa took the second new ball 11 runs later but there was a flurry of scoring from tailenders Rana Naved-ul-Hasan and Shahid Nazir, with Nazir playing some audacious shots against the fast bowlers to make a career-best 31 not out in an unbroken eighth wicket partnership of 44.
Harris at one stage conceded only six runs in nine overs as Pakistan found it difficult to score during the afternoon.
Playing in his second Test, Harris made a breakthrough shortly before lunch when he had Imran Farhat caught at silly mid-off for 68.
He followed up with the wickets of Faisal Iqbal, who drove a catch to cover, and Kamran Akmal, who tried to break the shackles imposed by Harris. Akmal hit two successive fours off the spin bowler but then top-edged a sweep to short fine leg.
Pollock claimed the crucial wicket of Pakistan captain Inzamam-ul-Haq with the help of a diving catch by AB de Villiers at midwicket. Inzamam made 35.
South Africa dropped four catches, with wicketkeeper Mark Boucher the culprit twice.
The left-handed Farhat, who survived a difficult chance to gully when he had seven Saturday, took most of the morning to advance from his overnight 41 but he was lucky to survive. Without adding to his score, he edged Makhaya Ntini to Jacques Kallis at second slip, with the ball reaching the fielder on the half-volley.
On 47 Farhat was dropped by Boucher off Ntini when Boucher dived in front of first slip Graeme Smith.
Farhat was almost strokeless against the fast bowlers but was more adventurous against the spin of Harris. But it was Harris who claimed his wicket when he stretched forward and the ball went straight from his bat to De Villiers, standing close to the bat.
Farhat batted for 261 minutes, faced 167 balls and hit 10 fours.