The battle of the Saints came to life in the second half after Sam Parkin gave the visitors the lead in 53 minutes with a bullet header but Michael Higdon levelled in the 62nd minute with a 25-yard free-kick.
A draw looked on the cards but with seconds remaining Craig grabbed a dramatic winner when he side-footed past Craig Samson from just inside the box after being set up by substitute Collin Samuel.
It was St Johnstone's second win of the season over the Buddies but they would have left Paisley glad of an early Christmas present after an evenly-fought match.
The visitors won 2-1 when the teams meet at McDiarmid Park earlier in the season but Derek McInnes' men went into the game only two points clear of Danny Lennon's much-improved team.
Higdon returned from suspension to replace Aaron Mooy while Perth side showed three changes to their line-up.
Defender David Mackay, midfielder Craig and striker Peter MacDonald came in for Alan Maybury, Cleveland Taylor and Samuel, who all started on the bench.
With Higdon back partnering the equally robust Gareth Wardlaw in attack, a back-to-front approach was expected from St Mirren.
And just after a minute the former got a header on target from a searching Patrick Cregg free-kick although his effort was easily saved by Peter Enckelman.
What followed thereafter was not pretty as a strong wind hampered both sides in their attempt to get the ball down and play.
In the 19th minute Higdon drove Paul McGowan's low corner from the right powerfully towards goal only to see Craig clear off the line at the near post.
Moments later, at the other end, MacDonald's left-footed effort from the edge of the box flew wide.
There was little of note until the 34th minute when Enckelman made a great point-blank save at his near post from Higdon's header after the Englishman had met a David van Zanten cross on the run from the right.
Taylor replaced Murray Davidson two minutes from the break after the St Johnstone midfielder had to go off injured.
Seconds from the interval St Mirren defender Marc McAusland took the ball off the head of Parkin who was poised to meet a Taylor cross, before Mackay's effort was cleared at the post by Steven Thomson.
The Perth side would have been encouraged by the positive way in which they finished the first half and they looked the more purposeful at the start of the second period.
In the 50th minute, after St Mirren skipper John Potter failed to properly clear a cross from Taylor, his McDiarmid Park counterpart Jody Morris drove over the bar but the move brought applause from McInnes on the sideline.
Three minutes later the St Johnstone manager had something more concrete to cheer about when Mackay, using Taylor as a decoy, drove in to the box past McGowan and crossed for Parkin to bullet a header past Samson from six yards.
The home side appeared flustered and moments later Taylor raced on to a Morris pass down the right and his cross was only just missed by MacDonald and then Craig.
But in the 62nd minute St Mirren were level after Higdon was fouled by Perth defender Steven Anderson 25 yards from goal.
The big Paisley striker lined up the free-kick and then drove powerfully past Enckelman.
St Johnstone retaliated and Samson made a great save from a Mackay header before Parkin slipped a shot from the edge of the box inches past the post.
St Mirren substitute Kenny McLean replaced Cregg while Samuel came on for MacDonald as both teams went for the winner. Michael Duberry headed a Danny Grainger free-kick just over and at the other end Enckelman made a fine stop from Van Zanten's angled drive.
But with seconds remaining of normal time Craig grabbed the winner when he side-footed past Samson after being set up by Samuel and the visitors saw out the three added minutes.