Sangakkara, playing his first competitive match since December after recovering from a finger injury, smashed the hapless Bangladesh attack to all parts before he departed for 142 after he was caught by Jahurul Islam in the covers off Sohag Gazi.
He was dropped on 111 when Mohammad Ashraful put down a head high chance at mid on off Gazi who took the other two wickets to fall.
"It's a great privilege to equal Mahela's record. Getting runs and scoring more hundreds sometimes you can say there is a selfish element, but if you keep doing that, you benefit and your side benefits as well," said Sangakkara.
"It was very satisfying getting back into the runs. Going into this match I had only batted three or four days and I had worked really hard on those sessions."
On a flat track, Bangladesh took the second new ball in the 81st over but bowled only four more before rain brought an early end to the day.
With Lahiru Thirimanne, who scored his third Test half-century, Sangakkara put on 124 for the third wicket.
Thirimanne was unbeaten on 74 at stumps with skipper Angelo Mathews on 25 not out.
Bangladesh's only success in the afternoon session was the wicket of Dimuth Karunaratne, who was trapped leg before on the back foot by Gazi for 41.
Karunaratne had earlier left the field when on 15 after he tried to pull a delivery from Shahadat Hossain and took a blow on his left elbow.
"Dimuth suffered from dizziness and double vision and was forced to retire," Sri Lanka manager Michael de Zoysa told reporters.
Karunaratne's opening partner Tillakaratne Dilshan had Sri Lanka off to a fast start after Mathews had won the toss for the home side on his Test debut as captain.
Dilshan hit 54 before he came down the track to Gazi and offered a low catch to Mominul Haque at mid-off.
- Sports & Recreation