The hosts, who won the toss and elected to bat on the easy-paced wicket, found runs hard to come by against the steady attack and plodded to 261-8 by stumps on the opening day at the Sinhalese Sports Club.
Upul Tharanga hit 92 and fellow opener Kaushal Silva made 41, but Sri Lanka lost seven wickets on either side of the tea interval after coasting at 144-1.
Pakistan's two left-arm seamers Junaid Khan and Wahab Riaz toiled manfully under the hot sun to share seven wickets and lead a spirited display by the tourists seeking a series-levelling win.
Sri Lanka's skipper Angelo Mathews made 39 when he was caught behind off Riaz for what became the last delivery of the day.
Tharanga put on 79 for the first wicket with Silva and 65 for the second with Kumar Sangakkara, but missed his century when he fell to a sharp catch by Azhar Ali at short-leg off Riaz.
Sangakkara, who hit 221 in the first Test in Galle which Sri Lanka won by seven wickets, managed just 22 when he was bowled by a superb in-cutter from Riaz.