More on KentOnline
Gillingham scored a winner in the fifth minute of stoppage time at Priestfield.
The Gills had failed to make the most of their early pressure in the League 2 encounter, and it looked like it might prove to be a frustrating afternoon before captain Shaun Williams pounced late on.
The 1-0 victory sent the Gills back to the top of the table.
Striker Macauley Bonne and centre-back Conor Masterson were both handed their first league starts of the season. With the boost of a midweek EFL Trophy win behind them, the Gills were hoping to build on that with league success.
The Gills were aiming to get back to winning ways in the league after defeats to Colchester and Grimsby, but there was no sign of negativity at a sun-drenched Priestfield early on, with the home fans in good voice and the players starting well.
Gillingham were unable to make the most of that early positivity and a flurry of corners, however, as visitors Harrogate grew into the match.
Jonny Williams had an early shot blocked and George Lapslie - back in the side following injury - glanced another effort narrowly wide from Scott Malone’s ball into the box.
Malone also had a shot deflected wide but from the subsequent corner Harrogate showed their threat on the counter as Luke Armstrong was almost put in on goal.
Action resumed following a drinks break midway through the half and Harrogate got even more into the game, forcing Shad Ogie into heading a cross wide, clearing the subsequent corner and soon after putting in a perfectly-timed challenge to deny Sam Folarin of getting through on goal.
Harrogate’s George Thomson was never going to trouble keeper Jake Turner with his low shot early in the second half while for the Gills another Mahoney corner came and went without troubling keeper Mark Oxley.
While Gills boss Harris signalled for Jayden Clarke to prepare to come on, Harrogate almost went ahead. Gillingham needed a shift in gear as Sam Folarin’s low cross was very nearly converted by Armstrong.
Clarke gave the Gills that impact they needed, immediately running at the defence and twice turning defender Kayne Ramsay, getting the fans behind the goal on their feet.
With 25 minutes left, Harris switched things around upfront as Ashley Nadesan and Tom Nichols replaced Bonne and Jonny Williams, neither of them being able to test the visiting keeper.
There was a lengthy delay midway through the second half for treatment to a Harrogate player, as various medical personnel dealt with Folarin, before he was removed on a stretcher after a head injury.
Gillingham had the better of the closing stages, which included 13 minutes of stoppage-time, and finally made it count in the 95th minute when Mahoney’s corner caused chaos in the box, Nichols had a shot blocked and captain Williams fired home from close range.
Ashley Nadesan was denied a goal by the visiting keeper as Gills broke fro a Harrogate free-kick.
Gillingham: Turner, Alexander, Malone, Masterson, Ogie, McKenzie, S Williams, Mahoney (Ehmer 90mins), Lapslie (Clarke 57mins), J Williams (Nichols 66mins), Bonne (Nadesan 66mins). Subs not used: Morris, Clark, Macarthur.
Harrogate: Oxley, Falkingham (Sutton 43mins), Thomson, Odoh, M Daly (J Daly 87mins), Folarin (Sivi 80mins), O’Connor, McDonald, Ramsay, Armstrong, Gibson. Subs not used: Thomas, Burrell, Sims, Foulds.
Referee: Neil Hair
Attendance: 5,778 (84 away)