Celtic moved six points clear in the Scottish Premiership as goals in the final 12 minutes by James Forrest and Timothy Weah floored St Johnstone.
The visitors were thwarted by a series of Zander Clark saves before Forrest finally jabbed in Timothy Weah’s cross.
Weah scored Celtic’s second on the break before the visitors’ Kristoffer Ajer was sent off in the final minutes.
The fifth-straight win may have come at a cost, with Mikael Lustig, Odsonne Edouard and Forrest all injured.
St Johnstone’s third consecutive defeat – after a run of 10 wins in 14 games – leaves Tommy Wright’s side sixth in the table, five points adrift of Hearts.
Celtic dominate after changes
A match-up between the two sides with most clean sheets in the top flight this season was always going to be a tight affair.
Celtic had won three in a row against St Johnstone – most recently the 2-0 victory in Glasgow last Wednesday – and had not conceded in the previous five meetings.
Brendan Rodgers’ side were unchanged from that midweek triumph, but their was rhythm disturbed inside the first few seconds when Ajer’s chin collided with former Celtic striker Tony Watt’s crown.
The centre-half lay motionless for several minutes receiving treatment and, as the Norwegian eventually stumbled to the sidelines, Matty Kennedy bulldozed his way through the area he vacated only to be denied by the outstretched leg of goalkeeper Scott Bain.
With Ajer back on the field, Celtic began to dominate possession against a St Johnstone side in which Sean Goss made his debut in one of four changes following Wednesday’s lacklustre display.
The visitors had a penalty claim rejected by referee Willie Collum, who judged Jason Kerr to have got a toe on to the ball as he slid in on Oliver Burke, but St Johnstone were creating the better chances and Watt flicked over the crossbar from close range.
Celtic were forced to blood new signing Jeremy Toljan earlier than Rodgers would have liked as Lustig failed to emerge after half-time and, with that change, the flow of the game turned in the visitors’ favour.
The on-loan Borussia Dortmund right-back’s cut-back from the byeline gave Burke the chance to deliver a powerful low drive that forced a superb one-handed save from Clark.
St Johnstone should have gone ahead moment later, but Watt inexplicably failed to connect with Kennedy’s cross from two yards out, perhaps distracted by the possibility of colliding with a post.
Celtic responded by dominating the rest of the game as Clark saved from Burke, Jozo Simunovic, Edouard and Scott Sinclair.
The visitors were not to be denied, though, and Forrest – who scored four goals on Celtic’s last visit to Perth – stabbed in as Scott Tanser hesitated at the back post.
As St Johnstone pressed for an equaliser, Weah turned in a Callum McGregor cross after a flowing move, and although Ajer was sent off for hauling back Callum Hendry, Celtic had already secured a sixth consecutive win at McDiarmid Park.
Celtic dig deep to beat ‘outrageously good’ Clark – analysis
BBC Scotland’s Alasdair Lamont at McDiarmid Park
Celtic’s persistence was ultimately rewarded on what looked for a long spell like being a frustrating afternoon.
There was an inevitability about it, such was the pressure on the St Johnstone goal in the second half. But, to overcome that doggedness, the champions had to dig deep and, when they did make the breakthrough, it had the feel of a significant moment. It was certainly celebrated as such.
Manager Wright will wonder what his side have to do to take anything from Celtic. They defended stoically for the most part and had Clark in outrageously good form. Even he could not keep Celtic out, but by performing at such a high level, as he has done regularly, against high-profile opposition, he must surely have caught the eye of Scotland head coach Alex McLeish.
Wright now has seven days to plan how to get the better of Rodgers and Celtic when they meet again in the Scottish Cup’s last 16.
‘A brilliant result against a good side’ – reaction
St Johnstone manager Tommy Wright: “I’m disappointed for them, but we did ask for an improved performance and I think we got that.
“We created Celtic more problems than Wednesday and, first half, we created the best chance. We contributed to Celtic’s first goal and the second was on the counter.”
Celtic manager Brendan Rodgers: “We knew that we had to be patient, while keeping the intensity of our game.
“Eventually, once we tire them out and the spaces open up a bit more in the last 25 minutes, then we took our chances to score. It was a brilliant result against a good side.”