Wanderers produced a magnificent fightback to end their losing run in morale-boosting style with two late goals at a bouncing UniBol Stadium.
Dapo Afolayan and Keiran Lee struck inside the final few minutes as the Whites displayed an undying spirit to complete a dramatic comeback.
Trailing 2-0 inside the first 15 minutes it could have been a tough afternoon as Ian Evatt’s men looked to end their three-game losing run and draw a line under the departure of captain Antoni Sarcevic.
Even as they dominated the final half-hour with a superb attacking display it began to look as though a first goal in four games might not come.
But Wanderers – roared on by a superb home support – finally got the reward their efforts deserved when Afolayan steered home his eighth goal of the season with four minutes to go.
And then 60 seconds into stoppage time, Lee swept home a low cross from Declan John to secure a point and get the Whites pointing back in the right direction.
Evatt was back on the touchline following his mid-week suspension and the Whites’ boss made four changes to his side in a bid to regain the winning thread.
Ricardo Santos was back from his own ban to captain the Whites for the first time with two further changes in the back four as John returned at left-back and Lloyd Isgrove started on the other flank.
But regardless of the personnel, Wanderers can’t kick the habit of conceding an early goal and once again they were up against it in the opening quarter of an hour.
Gillingham, who had ended their own losing run a week ago to bring some momentum north with them, went ahead after 11 minutes when John Akinde diverted a cross from the lively Danny Lloyd past Joel Dixon.
And three minutes later it was 2-0 when Kyle Dempsey was allowed the burst into the box and fire home.
Wanderers had actually started brightly – Dapo Afolayan fizzing an early shot wide –but that double blow set them back and further buoyed the visitors, who almost grabbed a third when Jack Tucker headed against the bar from another set-piece.
The Whites tried to play their way back into the contest but a deflected free-kick from Josh Sheehan pushed over the bar by Jamie Cumming was the nearest they came to pulling a goal back before the break.
Sheehan had been one of Wanderers’ better performers up to that point but two minutes after the break he nearly gifted the Gills a third with a short back-pass which allowed Vadaine Oliver to take the ball around Dixon before shooting wide of the target.
Evatt had been forced into yet another defensive change with summer signing Will Aimson coming on at half time for the injured George Johnston to make a Wanderers’ league debut.
And it was nervy stuff for a while as Dixon had to make a fine double save from Oliver to keep Wanderers in the game before Evatt sent on Amadou Bakayoko in place of Sheehan to try and inject more of a threat at the top end of the pitch.
With the home fans trying to lift their side there was more urgency from the Whites with Bakayoko and the impressive Isgrove stretching the Gills’ defence and Isgrove forcing Cumming into a save at his near post.
Wanderers were getting closer with Afolayan forcing Cumming into another sprawling save and Bakayoko - whose presence helped turn the tide - almost getting onto crosses to the far post.
A big chance to half the deficit and ask even some serious questions of the visitors came and went with a quarter of an hour to go when Eoin Doyle flicked on a corner for MJ Williams to lift ball over the bar from in front of goal.
And Elias Kachunga tested Cumming as the Whites gave everything to try and end their goal drought with the Gills hanging on and trying to run down the clock at every opportunity.
Santos then smashed an effort just wide but finally the breakthrough came when top scorer Afolayan kept his cool to steer the ball home from 20 yards with a fine finish as his perseverance paid off.
And with Wanderers sensing that an equaliser was now the least of their ambitions they kept pouring forward as the game went into injury time.
Lee popped up as the hero with his third goal in five games and only the clock seemingly stopped Wanderers claiming all three points on what felt like a pivotal afternoon.
Bolton: Dixon; Isgrove, Santos, Johnston (Aimson HT), John; Williams; Kachunga (Delfouneso 83), Sheehan (Bakayoko 55), Lee, Afolayan; Doyle. Substitutes: Gilks, Brockbank, Thomason, Gordon.
Gillingham: Cumming; Jackson, Ehmer, Bennett, McKenzie; O’Keefe, Tucker, Dempsey, Lloyd (Sithole 90); Akinde (Adshead 86), Oliver. Substitutes: Chapman, Kelman, Lee, Reeves, Lintott.
Booked: Demspey, Tucker, O’Keefe.
Referee: Ben Toner
Attendance: 13,807 (323 Gillingham)