The tourists, who won the first Test by an innings and 248 runs in Dhaka last week, hit up 587 in their first innings and Bangladesh replied with 86-1 by stumps on the second day. (Agencies)
Left-handed Sangakkara's maiden triple century was his ninth 200-plus knock, leaving him in second place behind Australian legend Don Bradman who had 12 scores of 200 or more.
Sangakkara, a 36-year-old veteran playing his 122nd Test, also became the ninth Test batsmen to reach the 11,000-run mark. He now has 11,046 runs in the all-time list headed by India's Sachin Tendulkar (15,921).
Having started the day on 160, Sangakkara hit 32 boundaries and eight sixes before he was last man out before tea attempting to force the pace.
Bangladesh's reply began on the wrong foot when star opener Tamim Iqbal was bowled by Suranga Lakmal with the fourth ball of the innings.
But Shamsur Rahman (45 not out) and Imrul Kayes (36 not out) repaired the early damage by adding 86 for the unbroken second wicket.
Both batsmen were lucky to survive till close as Shamsur was dropped by Mahela Jayawardene on 36 and Nuwan Pradeep grassed a simple catch offered by Kayes just before stumps.
Bangladesh will still need to bat out a major part of the remaining three days to prevent a 2-0 series rout.
The day was lit up by glorious strokeplay from Sangakkara, who flayed Bangladesh's hapless bowlers on the slow pitch at the Zahur Ahmed howdhury stadium. Left with number 11, Nuwan Pradeep at the other end, Sangakkara moved from 286 to 302 with a four and two sixes off consecutive deliveries from left-arm spinner Shakib Al Hasan.
Pradeep contributed just four in the 10th-wicket stand of 54 with Sangakkara, who knocked up 116 runs in the company of the last three batsmen.
When Sri Lanka began the day on 314-5, overnight batsman Kithuruwan Vithanage helped Sangakkara add 90 for the sixth wicket before the hosts hit back twice in successive overs.
Vithanage, who scored a maiden Test century in Dhaka, was given out leg-before to Nasir Hossain for 35 although television replays showed an inside edge off the bat.
The Decision Review System is not being used for the series.
In the next over, Shakib dismissed Dilruwan Perera leg-before as Sri Lanka slipped from 402-5 to 405-7.
Tail-ender Ajantha Mendis joined Sangakkara to add 100 for the eighth wicket before he was leg-before to Shakib for a fluent 47.
Shakib finished as Bangladesh's most successful bowler with five wickets, but his 34 overs cost 148 runs.
The hosts were dealt a double blow before play began as skipper Mushfiqur Rahim was unable to take the field due to a finger injury and spinner Abdur Razzak was sidelined with a strained hamstring.
Tamim Iqbal led Bangladesh in Rahim's absence and Shamsur kept wickets.
The tourists, who won the first Test by an innings and 248 runs in Dhaka last week, hit up 587 in their first innings and Bangladesh replied with 86-1 by stumps on the second day.