The visitors had been leading 2-1 going into the last quarter of an hour with a double from Steffen Wohlfarth coming each side of Michael Ngoo's 49th-minute equaliser.
Substitute Jason Holt equalised for the hosts on 79 minutes before an Evangelos Oikonomou own goal gave them the lead 60 seconds later. Ngoo then completed the goal flurry in the 84th minute .
The defeat sends County to their third successive loss in the SPL and keeps them trailing rivals Inverness by six points in the race for Europe.
The final result was not what the travelling team deserved. They dominated the first half and could have been out of sight before Hearts' late fightback.
The late announcement from the home stadium that man of the match was home goalkeeper Jamie MacDonald summed up the events of the day.
- Sports & Recreation