Australia, who started on the day on 83 for three, were 141 for seven at lunch, with the visitors needing another 127 to avoid an embarrassing loss for the top Test side.
Smith (55) made a gritty half-century before becoming Herath’s third victim of the morning session as the Australian batting crumbled on a turning pitch.
Adam Voges, who survived a successful umpire review on Friday after being judged LBW, was Herath’s first wicket of the morning session which started late due to rain.
Smith, who looked settled during his 125-ball stay at the crease that included a single boundary, then built a 43-run fifth-wicket partnership with Mitchell Marsh (25) to raise some hopes of recovery.
A persistent Herath trapped Marsh LBW with a successful umpire review after the batsman was given the benefit of the doubt by the on-field umpire, who had to overturn his decision.
But it was Smith’s prized wicket that got the Lankan camp in a celebratory huddle as the left-arm spinner got the gritty batsman plumb in front of the wicket.
Debutant spinner Lakshan Sandakan, who grabbed four wickets in the first innings, soon joined the party to send Mitchell Starc back in the pavilion and help the hosts inch closer to taking a vital lead in the three-match series.