Hardie curled home from 20 yards soon after David Obua looked to have consigned St Johnstone to defeat.
Hearts had fought back through Jose Goncalves after Murray Davidson's header had given Saints a richly-deserved half-time lead.
Csaba Laszlo was the SPL's most animated manager last season but he rarely emerged from his dugout despite watching his side produce a disjointed and lethargic first-half performance. His future remains a hot topic after owner Vladimir Romanov publicly questioned his judgement by claiming none of his summer striking targets were "suitable".
The Hearts manager insisted he would smooth over any differences with Romanov in private and if the discussions have as positive effect as his half-time team talk then he may still have a future at the club.
He almost never had the opportunity to turn the game around after Saints missed three increasingly good chances in the opening 10 minutes as the Hearts defence struggled badly with the aerial ability of Kenny Deuchar and pace of Collin Samuel. Davidson headed just wide from Dave Mackay's cross before Deuchar fluffed a shot from Samuel's centre.
Deuchar then headed Mackay's cross into the path of the onrushing Davidson, but the unmarked midfielder headed inches wide.
Ismael Bouzid was looking particularly vulnerable while both the fit-again Lee Wallace and Goncalves, who was moved into the middle as Marius Zaliukas continues his four-match domestic ban, received first-half cautions for hauling down Samuel. There was no surprise when Davidson gave Saints a 23rd-minute lead when he rose brilliantly 16 yards out to head Mackay's cross into the corner.
St Johnstone could not maintain their early pace but Hearts - with Ian Black in for Ruben Palazuelos - struggled to keep possession. Gary Glen shot well wide when Obua's pass into the right channel carved out their only real chance of the half.
Samuel saw a low shot from a tight angle saved by Janos Balogh after running on to a simple ball over the top by Jody Morris and Morais nodded wide after Deuchar had headed on Mackay's long free-kick in injury-time.
Davidson ran on to another Mackay cross within 90 seconds of the restart but could not direct his header on target and Saints failed to maintain their dominance.
Mike Tumilty issued yellow cards to Hearts full-back Craig Thomson and Mackay, who soon limped off for Gary Irvine, before making a huge call in the 55th minute when he booked Christian Nade for diving in the box.
Graham Gartland failed to deal with a long ball and Nade burst into the area, knocked the ball past Main before falling under the goalkeeper's challenge. Tumilty looked unsure but he booked the Hearts striker after assistant David Watt had signalled for a goal kick.
However, Hearts were level in the 59th minute when Goncalves headed home Thomson's inswinging free-kick from eight yards after Gartland had been booked for a late tackle on Michael Stewart.
The visitors, with David Witteveen and Arvydas Novikovas on to bolster their attack, looked a different side but they were grateful for Balogh's block after Millar had threaded the ball through for Samuel. The Hearts goalkeeper then pushed away a header by Hardie, who was on for the injured Davidson.
Black shot just over from 30 yards but it was St Johnstone who looked more threatening going into the final 10 minutes. Deuchar headed into the empty net following a Morais free-kick but Gartland was rightly penalised for a foul on Balogh.
Hearts soon stunned their hosts when Obua netted in the 86th minute. Wallace cut the ball back for Novikovas after a positive run and Obua knocked home the rebound after Main had brilliantly turned away the youngster's effort.
Saints piled forward and Wallace produced a great block from Morais before Balogh dived to turn away Deuchar's 20-yard drive.
But Hardie levelled almost three minutes into injury-time when he curled into the top corner after being fouled by Witteveen, who was chastised on the park by Laszlo after the final whistle.