Bangladesh, set a target of 457 to win the first Test, were all out for 197 with opener Soumya Sarkar the top-scorer with 53 off 49 balls.
Herath, in his 20.2 overs in the second innings, gave away only 59 runs to guide his team to victory in the first of the two-Test series.
Herath, Perera hand Sri Lanka control of first Test against Bangladesh
Earlier, Sri Lanka opted to bat first in the match and scored 494. Kusal Mendis scored 194 while Asela Gunaratne was the second best batsmen with 85.
Mehedi Hasan Miraz bagged four scalps for the vistors in the first innings.
In their reply, Bangladesh saw off the follow on courtesy captain Mushfiqur Rahim's solid 85 off 161 balls. The visitors were all out for 312.
Sarkar's unbeaten fifty improves Bangladesh's chances of survival
Sri Lanka then stretched their lead to 456 runs, after declaring thier second innings on 274-6.
Both teams will play the series decider at Colombo starting from March 15.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ