More on KentOnline
Daniel Akindayini hit a superb winner as Margate came from behind to end Hemel's Hempstead's nine-match unbeaten run.
James Potton's 49th minute effort looked like being enough to give Hemel the points, but Elliott Buchanan's 68th minute equaliser was followed, eight minutes later by Akindayini's excellent clincher.
The win ended a run of two straight Vanarama National League South defeats for Gate and said much for the character of Nikki Bull's depleted side, who, led by outstanding defender Danny Fitzsimons, had to hold on through six minutes of added time.
Boss Bull was still without a host of injured players including Lewis Taylor, Matty Fanimo, Brett Johnson, Scott Donnelly and Michael Thalassitis, the latter pair aggravating injuries during Tuesday's FA Cup draw with Hastings.
Adam Cash, Alex Osborn and Fitzsimons - back from a loan spell at Greenwich - came into the starting line-up, with Bull, Yado Mambo and under-21 midfielder Harry Phipps the only subs.
Hemel went into the match unbeaten in nine matches and looked a tidy, well organised side led by the league's player of the month for September James Kaloczi in midfield.
The visitors forced five first-half corners without stretching home keeper Lewis Ward too much although he was forced to turn aside a skidding effort from Hemel top scorer Jake Robinson on 22 minutes.
Six minutes later Robinson got in behind the Gate defence only to blaze over but those efforts apart it was possession without penetration.
Margate's Akindayini teed up Osborn for an early sight of goal but he blazed high and wide from a tight angle, and later in the half the winger returned the compliment knocking down Cash's chipped pass to Akindayini whose stabbed effort was deflected out for a corner.
Gate duo Matt Johnson and Luke Moore worked hard in midfield to break up play although referee Sam Purkiss thought skipper Moore had overstepped the mark when he slid in on Hemel's David King and gave him a booking.
Towards the end of the half Gate centre-half Manny Parry got involved in a contretemps with former Ebbsfleet man Jordan Parkes which resulted in both players being booked and referee Mr Purkiss also spoke to Gate boss Bull following the incident.
Bull revealed afterwards that Parkes had kicked Parry off the ball.
The breakthrough finally came four minutes into the second half when Hemel's Potton received the ball on the Gate right, cut inside his man and curled a shot inside the far post.
Gate were almost level within five minutes when Buchanan flashed a shot past Hemel keeper Jamie Butler only to see the ball thump against the far post.
Akindayini and Buchanan then combined well to set up a chance for the latter but defender Tony Diagne got across well to deflect the ball behind for a corner.
However with 22 minutes remaining the Blues were level as Osborn played in Buchanan who coolly rounded the keeper to slide home his fifth goal of the season.
Just moments earlier the Gate thought they'd won a penalty when Diagne sent Buchanan tumbling in the box but the referee waved play on.
Sub Lewis Taafe missed a great chance to restore the Hemel lead when he fired over and Akindayini volleyed just over at the other end before producing the game's decisive moment.
Receiving the ball on the edge of the area, the young striker picked his spot and curled a fine shot into the far corner to complete the Gate comeback. It was his third goal of the season.
Sponsors' man-of-the-match Osborn almost added a third in the dying minutes when he whistled a shot just wide.
Margate: Ward, Sessegnon, Tunwa, M Johnson, Fitzsimons, Parry, Moore, Cash (Phipps 82min), Buchanan, Akindayini (Mambo 90mins), Osborn; Sub: Bull.
Hemel Hempstead: Butler, Connolly, Kelly (Corcoran 76mins), Parkes (Montgomery 69mins), Diagne, Hayden, Kaloczi, Saunders, Robinson, Potton, King (Taaffe half-time); Subs: McNamara, Weiss.
Attendance: 454