The hosts, who bowled out Bangladesh for a meagre 62 on the first day, took their overnight score of 154-1 to 267-2 by the end of the 150-minute morning session at the P. Sara stadium.
Left-handed Sangakkara reached his 13th Test century shortly before lunch by lofting left-arm spinner Mohammad Rafique for a six. He has also hit 10 boundaries.
Skipper Mahela Jayawardene was unbeaten on a streaky 49, having put on 98 for the third wicket with Sangakkara.
Bangladesh, who bowled well in batting-friendly conditions, undid the good work with sloppy fielding that afforded the Sri Lankan captain two lives.
Jayawardene had not scored a run when he edged Mashrafe Mortaza between wicket-keeper Mushfiqur Rahim and first slip Habibul Bashar. Neither went for the waist-high catch.
Jayawardene then saw Rafique put down a simple return catch when he was on 28.
Opener Malinda Warnapura was the lone batsmen to be dismissed in the session for 82.
Warnapura, nephew of Sri Lanka's first Test captain Bandula Warnapura, had failed to get off the mark on his debut in the previous Test last week.
The left-hander made amends by making 79 on Tuesday, but added only three more runs in 40 minutes on the second morning when he miscued a hook off Shahadat Hossain to be caught at mid-wicket.
Warnapura put on 128 for the second wicket with Sangakkara to revive Sri Lanka after opener Michael Vandort had fallen cheaply for 14.
Sri Lanka won the first Test by an innings and 234 runs to take the lead in the three-match series.