The Scottish Premiership's bottom side looked set for another difficult afternoon after finding themselves trailing to Steven Thompson's opener within a couple of minutes of kick-off.
But the Jambos showed a positive response to a 4-0 drubbing against Kilmarnock in their last outing when Jamie Hamill's equaliser ensured they would not return to Edinburgh empty-handed.
Hearts were handed a massive boost with the return of Ryan Stevenson, who made an earlier than expected comeback after being sidelined since December 7 with a hamstring injury.
Saints headed into this clash boosted by an impressive Boxing Day win over Dundee United but made one enforced change as Danny Grainger replaced the injured Kenny McLean.
It was the home side who drew first blood, opening the scoring after just two minutes.
The Hearts defence failed to clear a Grainger corner and the ball eventually fell to Thompson who stabbed home from a few yards out.
Saints fans claimed a penalty when Paul McGowan's shot appeared to come off the hand of Danny Wilson but there was no spot-kick award from referee Kevin Clancy.
Jambos keeper Jamie MacDonald was then called into action to block a decent effort from Jason Naismith as St Mirren kept up the early pressure.
At the other end, Jamie Walker managed to force his way past several Saints players only for the end product to let him down as he blasted well over.
Walker then won a free-kick just outside the box and came closer this time with a swerving shot that fell just wide after being teed up by Hamill's short set-play.
Saints had the chance to double their lead before the break when Thompson's cross found Conor Newton but he was unable to keep the effort down and on target.
The Paisley side made a change at the interval, with Marc McAusland making way for David van Zanten.
The second half was less than two minutes old when Hearts hauled themselves back onto level terms in style.
Walker's ball into the box was cleared only as far as Hamill who unleashed a ferocious volley from 25 yards that left goalkeeper Marian Kello with no chance.
Saints immediately set about trying to restore their lead but furious claims for a penalty were ignored by the referee as Jim Goodwin claimed his shot was handled in the box by Brad McKay.
Thompson then passed up a great chance to grab his second of the day when his angled drive fell across the face of goal and slipped just past the far upright.
Hearts had clearly taken confidence from their equaliser and almost found the back of the net again when Stevenson set up Walker for a low shot that he drilled narrowly past the post.
But the Buddies should have been back in front when Newton's cross was met by the head of Thompson only for the striker to nod just over.
A well-struck shot from Gary Harkins looked net-bound before taking a massive deflection off McKay, before Kello produced a great save to deny Walker - and Hearts - at the end.