Karunaratne was man of the match in the first Test with scores of 147 and 83 but paid the price for attempting a quick early single as Mayers ran in and found him well short of the crease.
Oshada Fernando too was run out after being turned back by non-striker Pathum Nissanka.
With Angelo Mathews out with a hamstring injury, losing two early wickets was a massive blow for Sri Lanka. They have never lost a home Test to West Indies.
Earlier, off-spinner Mendis belatedly found his line and length, dismissing Nkrumah Bonner to end his 75-run stand with West Indies captain Kraigg Brathwaite.
It broke a two-session drought for Mendis, who then ran through the tourists' middle order, ending with figures of 6-70 as the West Indies were all out for 253 after tea -- a lead of 49.
The West Indies fell apart against the bounce of the new ball, though Mendis was denied a seventh wicket when wicketkeeper Dinesh Chandimal dropped Kemar Roach on eight.
Left-arm spinner Lasith Embuldeniya dismissed Brathwaite with a ball pitched on leg-stump that turned away sharply from the right-hander to clip the top of off-stump.
The West Indies were looking at a decent total and a considerable first-innings lead when they finished on 145-2 at lunch.
Brathwaite's straightforward footwork and impregnable defence were a vital bulwark for the West Indies after two top-order collapses in the first Test.
The skipper cashed in when loose balls were on offer and was relentless against Sri Lanka's two left-arm spinners, forcing the hosts to recalibrate to boundary protection.
But the afternoon collapse saw the visitors hand the initiative back to Sri Lanka on a fast-deteriorating wicket.
Mayers said he "took a few risks" on the way to his crucial unbeaten 36, and at the close of play he felt the West Indies had the "upper hand" after taking two early wickets.
Mendis said the home team wanted to ramp up pressure on the tourists by bowling dot balls and maiden overs, adding he was "pretty pleased" with his six-wicket haul.
The second Test has been plagued by inclement weather and bad light, and Wednesday was the first full day played.
Sri Lanka lead the two-Test series 1-0.