The tourists, who won the first Test by an innings and 248 runs in Dhaka last week, recovered from from 49-2 to a comfortable 314-5 by stumps on the opening day at the Zahur Ahmed Chowdhury stadium.
Left-handed Sangakkara was unbeaten on 160, his 34th Test hundred that drew him level with retired Sunil Gavaskar and Brian Lara in the all-time list of century-makers.
The four above them -- Sachin Tendukar (51 centuries), Jacques Kallis (45), Ricky Ponting (41) and Rahul Dravid (36) -- are also not playing Test cricket.
Senior pro Mahela Jayawardene helped close friend and long-time ally Sangakkara put on 178 for the third wicket after Sri Lanka were reduced to 49-2 soon after the first hour.
Jayawardene, who compiled an unbeaten 203 in the Dhaka Test, continued his good form with 72 before being leg-before to off-spinner Mohammad Mahmudullah in the final session.
Shakib Al Hasan removed Dinesh Chandimal and skipper Angelo Mathews before stumps as Sri Lanka slipped from 227-2 to 312-5, but were still in a good position after the opening day's play.
But the hosts removed both openers in quick succession just after the drinks break to share the morning session which ended with Sri Lanka on 71-2.
