The home side appeared to be cruising with Mark Bridge's strike and an own goal by Heart defender Patrick Gerhardt putting them in charge just after half-time.
But young Heart striker Josip Tadic set up a thrilling finish when he smashed home a cracking volley on 57 minutes to halve the deficit.
The visitors pushed hard for an equaliser and spurned a couple of decent chances to snatch a point in front of just over 8000 fans in Sydney's west.
It is now three straight defeats for John Aloisi's side, who could finish the round on the bottom of the table if neighbours Melbourne Victory defeat Wellington on Monday night.
But it's nothing but positives for the Wanderers who made it back-to-back wins and again showed they will be more than just competitive in their debut season.
Both sides were having trouble creating any clear-cut chances in a physical but sloppy opening.
There were a number of fierce challenges being put in, including one by Japanese superstar Shinji Ono on Jason Hoffman that may have been lucky just to be a yellow card.
So it was perhaps not a surprise that when things settled down and there was the first bit of quality play it resulted in a goal to Bridge on 28 minutes.
Aaron Mooy was given too much time in the middle of the park and he was able to thread a clever pass to Joey Gibbs on the edge of the box.
The young striker's touch went behind him a little but the ball fell perfectly into the path of Bridge, whose side-footed finish slipped underneath Clint Bolton and into the net.
Uninspiring for most of the opening half, the visitors almost hit back five minutes later but Mate Dugandzic blazed his volley over the bar from just six yards out.
It took less than six minutes into the second half for the home side to double their lead.
The Wanderers broke quickly from defence with Mateo Poljak releasing Youssouf Hersi down the right wing.
The pacy winger's cross looked like it would be easily dealt with only for Gerhardt to scuff his clearance into his own net.
It was a cruel piece of luck for the Heart but six minutes later they pulled a goal back.
Aziz Behich swung in a high cross to the far post which was met with a sweet right-foot volley by Tadic that cannoned in off the far post.
The Heart were almost level a minute later when Richard Garcia's strike from close range hit the post and went wide.
It was as close as they came in a tense finish to the match with the Wanderers holding on to move up into the top six for the first time this season.