Darren Bravo scored an attacking 80 runs but Tillakaratne Dilshan hit back with two wickets in the same over to reduce West Indies to 165-5 at stumps on day three.
The hosts declared their first innings on 387-9 in the first session and were quickly among the wickets, reducing the visitors to 77-3.
Seamer Nuwan Kulasekara trapped opener Adrian Barath for 3 runs with the score on seven.
In-form Chris Gayle fell cheaply to debutant seam bowler Suranga Lakmal after a promising 30 including seven boundaries. Gayle who made a career-best 333 in the previous test in Galle, was lured into a hook shot and was caught at deep square leg by Anjelo Mathews.
Shivnarine Chanderpaul was out for 8, trapped LBW by spinner Ajantha Mendis.
But Darren Bravo, who also scored a half-century in the previous test in Galle, and Brendan Nash combined for an 83-run partnership.
Dilshan trapped Nash LBW for 29 in his second over and Rangana Herath took a brilliant diving catch to dismiss Darren Bravo, who hit five boundaries and four sixes.
Dwayne Bravo (1) and Carlton Baugh (4) were batting when bad light stopped play.
Dilshan finished the day with two wickets for four runs in two overs.
Sri Lanka resumed day three on 294-5 and Captain Kumar Sangakkara was dismissed for 150 before declaring the innings closed.
Pace bowler Kemar Roach returned 5-100, his second five-wicket haul for the West Indies.