Last man out was silver fox Rangana Herath, cricket's most successful left-arm spinner in history, in his last match before retirement.
The hosts, chasing a notional 462 victory in the first match of a three-Test series, could only muster 250 on Day 4, with Jack Leach taking three wickets to go with Ali's four, with Adil Rashid and Ben Stokes getting one each.
England had secured a first-innings lead of 139 thanks to a century on debut by Ben Foakes -- Man of the Match -- and a formidable spin attack led by Ali and assisted ably by Leach and Rashid restricting Sri Lanka to 203.
In England's second innings an assured unbeaten 146 by Keaton Jennings, his first century since a ton on his 2016 debut that has silenced his critics for now at least, allowed Root to declare at 322/6.
"Our batting was below-par during the game, you can't stay in the game (with this kind of batting)," Sri Lanka's captain Dinesh Chandimal said.
"Credit goes to England, they played some outstanding cricket. We had a really good start in the first session but we couldn't capitalise on it," he said.
Resuming on 15/0, openers Kaushal Silva and Dimuth Karunaratne withstood the pressure from England's formidable bowling attack for the first hour.
But both fell to attacking shots, with Kaushal leg before trying to sweep Leach for 30 before Karunaratne was caught and bowled by Ali for 26 when he skipped down the pitch for an attempted heave.
Dhananjaya de Silva, after a confident start, was caught at first slip by skipper Joe Root off Ben Stokes in the last over of the morning session for 21.
One ball earlier, de Silva had been given out caught behind flashing at a Stokes delivery wide of the off stump, but he was reprieved on review.
After lunch, Kusal Mendis hit Leach for a four over his head but attempting a repeat the next ball skied the ball to Ali and departed for 46.
He had earlier appeared confident at the crease, employing the sweep shot especially well against all England’s spinners, while secure in defence.
Home skipper Dinesh Chandimal, suffering from a groin injury that kept him off the pitch all of Thursday, was bowled by Leach for 11.
The final session began badly for the hosts. Niroshan Dikwella fell the first ball after tea, caught adroitly by Stokes one-handed at slip off Ali for 16.
Soon afterwards Angelo Mathews -- dropped on 18 by James Anderson -- went for 53, caught by Jos Buttler at midwicket with Ali again the wicket-taker.
He was followed into the pavilion by Akila Dananjaya for 8 before Herath -- perhaps a yard or two slower than in his pomp -- was beaten by Stokes's quick arm as the 40-year-old dived for his crease.
England's varied attack, with three quicks and three spinners, applied substantial pressure, with the slightly expensive Rashid the only minor disappointment.
"To be able to contribute to the team is just amazing," Foakes said after being named man-of-the-match.
"One of the best weeks of my career so far, if not the best. Yes, it's a dream come true to be fair," said the Surrey wicketkeeper-batsman, brought in to replace the injured Jonny Bairstow.
First Published: November 9, 2018, 5:14 PM IST