Rowan Vine's scrambled goal consolidated St Johnstone's position in the top half of the Clydesdale Bank Premier League and delivered a major blow to St Mirren's chances of joining them.
Vine shot home from close range early in the second half after Murray Davidson had bundled the ball goalwards following Mehdi Abeid's corner in a goal that followed a similarly scrappy first 45 minutes on a bumpy McDiarmid Park pitch.
The home side built on the goal and hit the frame of the goal three times with home goalkeeper Alan Mannus not seriously troubled in the second half.
They moved into fourth place, level on 40 points with Motherwell, while St Mirren are now eight points adrift of the top six with six games left until the split.
St Mirren's first effort saw Conor Newton's low strike parried away by Mannus, who then handed Steven Thompson a chance when he chested the ball out on the cusp of the 18-yard line as Goncalves chased a long ball. However, Thompson was too high with his attempted lob.
Craig fired just wide after a one-two with Vine, with a corner given after the shot nicked off a defender. The delivery eventually fell for Abeid 16 yards out and the on-loan Newcastle midfielder - facing St James' Park team-mates Paul Dummett and Newton - volleyed over with his left foot.
Vine was booked for a dive when he threw himself to the ground clutching his leg as David van Zanten jockeyed him in the box, getting up as soon as Steven McLean flashed the yellow card.
Goncalves almost got away in the opening stages of the second half but Frazer Wright got back well and the Perth club took the lead in the 52nd minute.
No St Mirren defender reacted quickly enough when Abeid's corner bounced in the six-yard box and Davidson drove in to force the ball towards the goal with Vine making sure on the goal-line as he fired the ball into the back of the net.
And St Johnstone almost doubled their lead with five minutes left when Tade headed Craig's corner off the bar before the striker headed Craig's cross off the post in the dying seconds.