More on KentOnline
Lewis Taylor's 77th minute winner clinched Margate's place in Sunday's Ryman League Premier Division play-off final against Hendon.
Taylor's header helped into the net by luckless Hamlet defender Matt Drage settled the tie in front of more than 1,000 spectators on a wet night at Hartsdown Park which had been delayed more than a fortnight after Enfield Town lodged an unsuccessful appeal against a three-point deduction for fielding a player while suspended.
Hendon won the other tie, coming from behind to win 2-1 against Metropolitan Police who finished with nine men.
Hamlet went closest to scoring in the first half when ex-Gillingham midfielder Albert Jarrett saw his effort hit both posts, before top scorer Ryan Moss put Gate in front four minutes before the interval.
Moss outjumped Hamlet goalkeeper Phil Wilson to head in his 23rd goal of the season following a cross from skipper Charlie Allen to send Terry Brown's men to the dressing room in good spirits.
However Gate were grateful to goalkeeper Nikki Bull for keeping them ahead five minutes after the restart.
Bull, who cancelled a holiday to play in the tie, kept out a 20-yard effort by Nyren Clunis.
However Clunis lifted the hopes of the big travelling support 18 minutes later, with an excellent equaliser.
He picked up the ball on halfway, before cutting in from the left and shooting into the far corner.
Moss then turned goalmaker for Lewis Taylor - the ball deflecting in off Drage. Four minutes of stoppage-time prolonged the nerves, but Gate went through.