The hosts, who started the day on 56-4, lost their last five wickets for just three runs to be bowled out in the opening session of day two at Dhaka’s Sher-e-Bangla National Stadium.
Sri Lanka, who made 222 in their first innings, were nine for no loss at lunch. Dimuth Karunaratne, on six, and Kusal Mendis, on three, were batting at the break.
The session belonged to Dananjaya, who is playing his first Test after 19 one-day internationals and nine Twenty20 games, returning impressive figures of 3-20 with his off-spin.
Paceman Suranga Lakmal also claimed three wickets while off-spinner Dilruwan Perera picked two to flatten the Bangladesh batting.
Mehedi Miraz, who was sent in as nightwatchman on day one, remained unbeaten on 38 — the highest score in the Bangladesh innings.
Lakmal provided the opening blow when Liton Das dragged a short-pitch ball onto his stumps to be bowled, adding just one run to his overnight score of 24 runs.
Miraz and skipper Mahmudullah Riyad then put on 34 runs for the sixth wicket to resist the Sri Lankan attack but once the partnership was broken the batting fell in a heap.
Dananjaya cleaned up Mahmudullah for 17, and got two more wickets in Sabbir Rahman — out for a duck — and Abdur Razzak to make Bangladesh stare down the barrel.
Perera trapped number-11 Mustafizur Rahman leg-before wicket for nought to wrap up the innings that started in the final session of the opening day.
The first Test ended in a draw in Chittagong. (Courtesy AFP)