Bairstow continued his outstanding form with the bat, by underpinning England’s 298 with his second Test century - first on his home ground, and in his home country - and added nine catches behind the wicket.
Evergreen Anderson enhanced his reputation yet again with match figures of 10 for 45 as Sri Lanka were bowled out twice in the space of 72 overs - for 91, and then 119 following on, to lose by an innings and 88 inside three days.
England’s leading Test wicket-taker went up to sixth in the world’s all-time list, excelling at a ground where he curiously has not in the past and proving his well-being at the age of 33 after a marginally lacklustre tour of South Africa last winter.
For Bairstow, a compelling performance both in front and behind the stumps was further vindication of his position - having returned to the Test team only last summer, initially as a specialist batsman, after an 18-month absence. Captain Alastair Cook had glowing praise for both, and voiced his delight that Bairstow is proving his own initial judgment correct - after being convinced the Yorkshireman would play for his country from the very first time he saw him bat back in 2010.
“Jonny was playing on a different wicket to the other 21 guys - it was an extraordinary innings,” he said of his 140 here.
“The bowlers, you don’t want to take it for granted - but you knew with those two [Anderson and Stuart Broad], the skill they have got, it would be really hard work for Sri Lanka.”
Bairstow first restated his case for England with a match-winning and series-clinching 83 not out in a one-day international against New Zealand last June.
Cook added: “Ever since that ODI innings at Durham, he realised he can play international cricket and be the talent we all knew he could be.
“I remember the first time I saw him play, at Scarborough, he played differently to everyone else - we couldn’t stop him scoring.
“I thought he’d play for England, the first time I saw him.
“Like everyone, you take a bit of time - and over the past two years there hasn’t been a better batsman in England.
“Scoring a hundred at Headingley must have been really special for him as well.”
Anderson was unstoppable in both innings, having benefited from a change of ends after more than a decade of relative previous mediocrity at this venue.
“Everyone was not (exactly) writing him off in South Africa - but it was great to see Jimmy back to his best,” said Cook.
“He’s got a few more wickets left in him ...”
Cook and Anderson finished the last Test here against Sri Lanka in an emotional state, the former considering his position and his premier bowler in tears after being last out to lose by 100 runs as the tourists clinched the series 1-0 in 2014.
Cook brought Anderson back to strike the final blow this time, as he made his revenge complete with his third 10-wicket haul.
“It’s not about milestones in general,” said the captain.
“But at certain times you can, and he earned the right.”
Cook admitted to some doubts returning to take on Sri Lanka at Leeds, after that defeat two years ago, adding: “Turning up on the same ground against the same opposition, there’s no doubt you wonder if the cricketing gods have something in store for you again - another shock.
“I’m glad. You never bury a moment like 2014, but we put in a performance at the standards we can play - and we didn’t do that in 2014.”
England will head to Durham for the second Test, starting on Friday, with Cook still needing 20 more runs to become the first from this country to reach 10,000 in Tests.
They may well be without Ben Stokes on his home ground, though - the all-rounder set for scans on his knee injury before an updated squad is announced on Sunday.
“He is not 100 per cent right ... it doesn’t look good for Durham,” said Cook.
“But you never know. He will get a scan tomorrow.”
Sri Lanka’s troubles are far greater.
Cook’s opposite number Angelo Mathews said: “It was quite an embarrassing defeat ... humiliating.
“Anderson showed his class, and Stuart Broad was brilliant as well.
“You have to be realistic, batting against these guys in these conditions. But one or two of our guys needed to put their hands up, and we failed to do that.
“We got them 80 for five in the first innings, then we dropped a couple of catches and let them off the hook. But Jonny Bairstow batted brilliantly.”