Cha Du-ri broke the deadlock with a drive from distance in the first of three added minutes tacked on to a woeful game.
In the dying seconds fellow Korean Ki Sung-yueng scored a second to send the Hoops fans home happy and keep them within two points of leaders Rangers, although the Light Blues have a game in hand.
Celtic’s fit-again skipper Scott Brown started for the first time since October. The midfielder had returned as a substitute against Kilmarnock in midweek after recovering from a foot injury but was one of three changes Neil Lennon made to his side.
Also included in the starting line-up were Georgios Samaras and Paddy McCourt with Joe Ledley, James Forrest and the injured Gary Hooper missing.
St Johnstone manager Derek McInnes was without suspended duo Jody Morris and Jamie Adams and made three changes to the team which beat St Mirren 2-1 in their last outing.
In came Alan Maybury, Collin Samuel and Cleveland Taylor with Peter MacDonald on the bench and Murray Davidson out with an ankle knock.
Celtic had slipped up in recent weeks by drawing their last three home games and were under some pressure to get back on track.
Saints, meanwhile, went into the game having taken seven points from their last three away matches.
The visitors had the glimpse of a chance after only a few seconds when slackness in the Hoops defence allowed Samuel to run through but the striker overran the ball for a goal kick.
A half-empty Celtic Park saw the home side take control and it soon became clear St Johnstone were content to play counter-attacking football.
But Celtic’s first real chance did not arrive until the 19th minute when Niall McGinn’s cross from the right found McCourt coming in at the back post but his fellow Northern Ireland international failed to connect properly and the ball bounced wide.
Celtic looked unconvincing for the most part though, with St Johnstone goalkeeper Peter Enckelman having little to deal with directly aside from Daryl Murphy’s long-distance effort, which he handled impeccably.
St Johnstone were offering little as an attacking force and the home side only increased their corner count.
In a rare St Johnstone attack on the half-hour mark Maybury drove high over the crossbar from 25 yards after being set up by Chris Millar.
Minutes later McCourt darted past a couple of St Johnstone challenges at the edge of the visitors’ penalty area but his shot went straight at Enckelman.
Celtic started the second half brightly and within a minute McCourt had gone on a trademark mazy run into the St Johnstone penalty area only to fire wide of the target from six yards.
Moments later Murphy had an angled drive from 12 yards saved by Enckelman, but the groans from the home fans grew in volume after Saints midfielder Taylor had drilled the ball across Celtic’s six-yard box to find no takers.
In the 56th minute, after Maybury had fouled Brown at the edge of the Perth penalty area, Hoops midfielder Ki drove the free-kick straight at the defensive wall to stoke the disgruntlement.
There were loud boos on the hour mark when Anthony Stokes replaced Samaras, the Hoops fans believing there were poorer performers than the Greece striker.
There was a moment of danger for the visitors when Enckelman spilled a low McCourt cutback but St Johnstone defender Michael Duberry was on hand to clear for a corner which again came to nothing.
After Murphy had missed a decent chance while under pressure in the St Johnstone box he was replaced by Olivier Kapo, who was making his Celtic debut and hit the crossbar with three minutes to go.
However there was to be late drama when, in the first minute of three added minutes Cha Du-ri broke the deadlock with a shot from distance and with almost the last kick of the ball Ki grabbed a second.