Kumar Sangakkara, who scored a century in each innings of the drawn first Test in Galle, was unbeaten on 38 at the break with Dinesh Chandimal (three not out).
The hosts added 63 runs to their overnight total of 18-1.
Dimuth Karunaratne added five to his overnight score of 12 before he was caught by wicket-keeper Mushfiqur Rahim off Abul while Lahiru Thirimanne was also caught behind, off Robiul.
Thirimanne, who scored a century in the last match, failed to open his account this time.
Gazi put more pressure on Sri Lanka when he had skipper Angelo Mathews (16) caught by Mohammad Mahmudullah in the slips.
Sangakkara played some attractive shots in the morning session, driving Abul through the covers and then firmly cutting in the same over for two fours.
Sri Lanka's left-arm spinner Rangana Herath on Saturday finished with 5-68 as Bangladesh were bowled out in the final session. Mominul Haque top-scored for the tourists with 64.