The tourists, trailing by 488 runs on the first innings, moved to 188-3 in their second knock by tea on the third day at the Sinhalese Sports Club here.
Bangladesh, who resumed after lunch at 110-1, lost opener Javed Omar for 62 and former captain Habibul Bashar for 17 in the afternoon session.
Rajin Saleh was unbeaten on a dour 33 and new captain Mohammad Ashraful was on 19 at the break, the pair having added 28 for the unbroken fourth wicket.
Bangladesh still need 300 runs more to make Sri Lanka bat a second time, but the Test minnows look determined to put up a fight after being shot out for 89 in their first innings.
Dark clouds gathered overhead as the players headed for tea, raising prospects of an early finish to the third day's play.
Openers Omar and Shahriar Nafees, who started at the overnight score of three for no loss, frustrated the Sri Lankans by carving out 86 for the first wicket.
It was Bangladesh's best opening stand against Sri Lanka, surpassing the 52 between Omar and Nafees Iqbal at home in Bogra last year.
Omar began by driving Chaminda Vaas through the covers thrice in one over and then flicked two consecutive boundaries off Lasith Malinga at the other end.
Left-handed Nafees straight drove Vaas and pulled Malinga before bringing up the 50 partnership in 55 minutes by lofting off-spinner Muttiah Muralitharan for a four.
Muralitharan, who bagged five wickets in the first innings, finally broke through 30 minutes before lunch when he accepted a hard return catch off a Nafees straight drive.
Nafees made 38 with seven boundaries.
Omar, who was 52 at lunch, added 10 more runs when his brave knock was ended by a vicious yorker from Malinga that trapped the batsman in front of the wicket and injured his right toe.
Omar limped off the field after his eighth Test half-century that was studded with 10 boundaries.
Bashar made 17 when he hung his bat out to an Vaas outswinger and was snapped up behind the stumps by Prasanna Jayawardene.
Sri Lanka had piled up 577-6 declared in their first innings with captain Mahela Jayawardene, opener Michael Vandort, wicket-keeper Prasanna Jayawardene and Vaas scoring centuries.
Bangladesh and Sri Lanka are due to play three Tests and as many one-day internationals on the tour that ends on July 24.