Hearts, aiming to become the first side outside the Old Firm to win the title in 41 years, have led the league almost all season. But their advantage over Rangers, which once stood at 13 points, is down to two after Danny Rohl's men twice came from behind to win a thriller at Ibrox.
The Jambos lost for the first time in six meetings against the two Glasgow giants this season, despite twice taking the lead in the first half through Marc Leonard and Claudio Braga.
Michael Steinwender's own goal briefly brought Rangers level, and Chermiti made the most of a kind break of the ball to equalise for a second time before half-time.
His first career hat-trick ended with a calm finish on the counter-attack in the 90th minute.
Meantime, Celtic are three points off the top and have a game in hand over both their title rivals.