First-half goals from Jamie Walker and Kevin McHattie and a second-half penalty from Jamie Hamill gave the Edinburgh side a deserved win, Kenny McLean's red card compounding the Buddies woes; they remain eight points clear of Dundee, who have three games remaining.
An early deflected shot from Jason Holt forced St Mirren keeper Craig Samson into action while Lee Mair wasted a great chance to settle nerves shortly before Walker had the home fans on their feet.
He embarked on a slaloming run through the St Mirren rearguard before cracking one in off the underside of the bar (13) from 20 yards for only his second Hearts goal.
McHattie (43) then tried his luck with a 30-yard free-kick that flew beyond Samson's despairing dive, the keeper possibly unsighted.
The outcome of the game was effectively settled in the 53rd minute as first Steve Thompson saw his penalty appeals waved away, and Sam Parkin's header was hacked off the line.
Having gone so close at one end, the Saints promptly conceded at the other as McHattie was sent sprawling by McLean, who was on his way for an early bath before Hamill scored the resultant penalty (54).
Darren Barr headed Gary Teale's effort off the line to increase the visiting side's frustration and Saints will be anxiously awaiting news of Dundee's game against Aberdeen on Sunday.