The prolific left-hander was unbeaten on 189 as the hosts moved to 449-4 by tea on the fourth day, trailing by just two runs with six wickets in hand.
Sangakkara, second only behind Australian legend Don Bradman's tally of 12 scores of above 200, has so far hit 21 boundaries in his 37th Test century.
Skipper Angelo Mathews made 91 during a fourth-wicket stand of 181 with Sangakkara before he was caught in the slips off Saeed Ajmal just before tea.
Kithuruwan Vithanage kept Sangakkara company at tea on five as the opening match of the two-Test series headed for a draw unless Sri Lanka bowled Pakistan out quickly in the second innings.
More From This Section
Pakistan paid heavily for dropping Sangakkara off the first ball of the day when Abdur Rehman spilled a chance at point off left-arm seamer Junaid Khan.
Junaid struck three deliveries later as Mahela Jayawardene was adjudged leg-before through the Decision Review System (DRS).
Jaywardene, who is due to quit Test cricket after the series ends in Colombo later this month, made 59 in a third-wicket stand of 113 with Sangakkara.
The 36-year-old Sangakkara had on Friday risen to fourth place in the list of century-makers with his 37th hundred, the seventh three-figure knock in his last 14 Tests.
Only the retired trio of India's Sachin Tendulkar, with 51 centuries, Jacques Kallis of South Africa, who had 45, and Ricky Ponting of Australia on 41, have scored more hundreds.