Goals from Lee Croft, David McCracken and Fran Sandaza kept Steve Lomas' side joint-fourth with Dundee United in the race for a European place.
Danny Lennon's side remain eight points behind sixth-placed Hearts with just three game remaining before the split.
The Tynecastle club will end St Mirren's top-six ambitions if they beat Hibernian in Sunday's Edinburgh derby.
St Mirren boss Danny Lennon made two changes to the side that drew 2-2 with Hearts in the Scottish Cup last weekend.
Kenny McLean and Steven Thompson both missed out through injury, although the latter was fit enough to make the bench.
Dougie Imrie returned after being cup-tied while centre-half Marc McAusland also came in after missing a month through injury.
St Johnstone manager Lomas was without the suspended Cillian Sheridan, who was sent off against Kilmarnock two weeks ago.
But he was able to bring back influential captain Jody Morris as he opted to stiffen up his midfield.
St Mirren were chasing a first win since beating Rangers on Christmas Eve as they tried to keep their top-six hopes alive.
St Johnstone - out of action for a fortnight - were hoping to pile pressure on Dundee United in the race for fourth place.
They wasted little time as Croft fired them into an early lead with a wonderful finish.
Picking up possession 20 yards out, the winger rifled a fierce shot into the bottom corner past the helpless Craig Samson.
St Mirren defender Lee Mair was booked for a foul on Sandaza and Samson gathered Liam Craig's free-kick at the second attempt.
Nigel Hasselbaink then threatened as St Mirren finally made some headway but Alan Mannus saved easily.
St Johnstone central defenders Frazer Wright and David McCracken were both booked by referee Bobby Madden as tackles flew in.
St Mirren settled and Graham Carey blazed a free-kick over the bar in 15 minutes.
There was little space behind the St Johnstone defence and Paul McGowan tried his luck from distance in 25 minutes but his shot flew over.
At the other end, Murray Davidson's long-range effort was deflected narrowly wide.
The game had become a midfield battle, with clear-cut chances extremely scarce.
St Mirren forward Dougie Imrie took matters into his own hands before half-time - driving into space and dragging a shot just wide.
The home side began the second half brighter but Gary Teale wasted a great chance after being sent clear on the right.
Croft fired wide as St Johnstone immediately broke upfield but St Mirren carried a bigger threat. Nigel Hasselbaink's curling shot was saved by Mannus and McGowan's 25-yard drive was also saved.
St Johnstone came close to adding a second in 56 minutes after great work from Murray Davidson created an opening for Sandaza.
The Spaniard took a perfect touch in the box but his shot lacked pace and Samson saved. Moments later, Mannus spilled a Carey shot but there were no takers for the rebound.
Carey almost grabbed the leveller in 65 minutes - sending a stunning volley inches wide. Sandaza then sent a free-kick over the St Mirren wall but Samson gathered easily.
Sandaza fluffed a brilliant chance to kill off St Mirren and Murray Davidson was also thwarted by Samson.
But the visitors finally got the second in 76 minutes when Samson fumbled Craig's corner and McCracken scored from close range.
Sandaza added some sheen to the scoreline when he was sent clear by Murray Davidson and slotted his finish beyond Samson.