Moeen Ali trapped Mathews lbw in the first over after tea to end the senior batsman's solid resistance that had kept alive Sri Lanka's hopes of chasing down a target of 301.
Leach struck soon to get Dilruwan Perera for one when torrential rain halted proceedings for the day with Sri Lanka on 226 for seven in Kandy.
The hosts, who trail the three-match series 0-1, need another 75 to win with three wickets and three sessions in hand. Niroshan Dickwella was batting on 27 when play was stopped.
"It is evenly poised. Unfortunate I got out at a very crucial time. But we still have got a batter at the crease," a confident Mathews told reporters after an intriguing day's play.
"Then guys like Akila Dananjaya and Suranga Lakmal are no mugs with the bat. So we are not out of the game. If we get one good partnership we are in with a win," said Mathews.
Leach has claimed four wickets with his left-arm orthodox spin while Ali has taken two on a turning pitch.
Mathews, who hit his third half-century of the series, took the crease with Sri Lanka on a shaky 26-3.
The former captain played a gritty innings that lasted 137 deliveries and also built crucial partnerships.
His 73-run fifth wicket stand with Roshen Silva (37) frustrated the English spinners in the afternoon session.
Ali had Silva caught behind with a faint edge. The umpire had given Silva not out before England successfully reviewed the decision in their favour.
"It is a wicket where there is lot of assistance to the spinners. Credit to England for bowling so well. They didn't give too many loose balls. We had to work extremely hard to score runs," said Mathews.
"Dimuth (Karunaratne) was superb today with the bat and it was extremely unfortunate that he had to fall for a brilliant catch.
"That changed the game. He was the batsman in form. Had we got a bigger partnership we would have been in a commanding position," he added.
Leach had rattled the Sri Lankan top-order with three early wickets after the tourists were bowled out for 346 in the morning session.
Left-handed Karunaratne then put on 77 runs with Mathews before falling to Adil Rashid for 57.
Karunaratne swept a turning delivery as Keaton Jennings anticipated the hit from forward short leg to get a hand to the ball which popped out and an alert Ben Foakes finally took the catch.
"I saw him go down to paddle and just set off running. He got a little too much bat on it and it ended up at me," said Jennings.
"I'd love to say I parried it to Foaksey but I genuinely tried to catch it. It hit me really hard and went straight off to Foakesy."
England, who had resumed the day on 324-9, stretched their second innings lead to 300 with overnight batsman Foakes hitting an unbeaten 65.
Foakes, who hit a ton on debut in Galle, added 14 to his overnight 51 and shared 41 runs for the last wicket with James Anderson (12).AFP