More on KentOnline
Josh Wright scored a nine-minute hat-trick of penalties as Gills took a giant step towards League 1 safety on Saturday.
Gillingham were heading to defeat after Scunthorpe dominated and led 2-0 with less than 15 minutes left.
But three penalties saw the home side create an amazing turnaround to send the Priestfield crowd home happy.
Gills made two changes from the win at Bury the previous weekend. Deji Oshilaja and Chris Herd came into the starting line-up with Emmanuel Osadebe and Ryan Jackson dropping out of the side.
Scunthorpe, beaten 2-1 at Charlton in midweek, arrived having not won a league game since the end of January.
That may have meant they were low in confidence but it didn't show as they took command straight away.
Less than four minutes were on the clock when Kevin van Veen found space down the right and crossed for Paddy Madden to sweep home from close range.
Gills couldn't get to grips with van Veen, who ran the game from the hole behind the front two.
But Gills were also making it difficult for themselves. It should have been 2-0 in the seventh minute as Zesh Rehman and Max Ehmer got themselves in a tangle. Madden was clean through on goal but put his right-foot shot wide of the target as Nelson came rushing out.
Gills went close to an equaliser when Ehmer's near-post header from Bradley Dack's corner was cleared off the line by Stephen Dawson.
The bumper home crowd, boosted by a Kids for a Quid scheme, were calling for a penalty when McDonald went down under David Mirfin's challenge in the box but referee Robert Lewis saw nothing wrong despite being well behind the play.
Ehmer and Herd both went into the book for fouls as Gills tried to get a foothold in the game.
Although Joe Quigley saw his deflected shot go just wide of the far post, as an attacking force the Gills never got their passing game going.
Van Veen fired a 30-yard free-kick over the bar, Nelson saved smartly from Madden and then Herd made a fine late tackle to deny Hopper as the visitors went into the break wondering how they had only managed to score one goal.
Gills started the second half brightly, at last showing some attacking intent.
But it was the visitors who then regained control and they should have wrapped the game up. Van Veen and Madden were both denied by Nelson while Dawson shot wide after a fine block by Rehman to thwart Madden.
Scunthorpe finally doubled their advantage on 73 minutes when Harry Toffolo fired home from 20 yards, the ball going past Nelson before he seemingly had time to react.
It looked like that was it for Gills. But they came back into the game just four minutes later when Matt Crooks needlessly fouled Dack in the area.
Wright stepped up to score his 10th goal of the season from the penalty spot.
Five minutes later, Ehmer won a header in the box and a stray arm was spotted to have handled by the referee who again pointed to the spot. Wright this time went the other side as keeper Luke Daniels was again beaten.
The amazing turnaround was complete on 85 minutes when van Veen tripped Wright in the box and the man of the moment had a third penalty to convert.
Cool as you like, in front of the Rainham End, Wright went the same way as his second spot-kick. Daniels went to his left for a third time and Gills were in the lead.
Five additional minutes came and went, the only blemish of a great recovery when Wright bagged his 10th booking of the season for celebrating with the fans.
Gillingham: Nelson, Oshilaja, Ehmer, Rehman, Herd (Osadebe 46mins), Byrne, Wright, Martin (Hessenthaler 74mins), Dack, McDonald, Quigley (Parker 68mins). Subs not used: Dickenson, Holy, Cundle, Muldoon.
Scunthorpe: Daniels, Wallace, Mirfin (Davies 90mins), Dawson, Madden, van Veen, Hopper (Toney 87mins), Toffolo, Ness (Bishop 75mins), Crooks, Clarke. Subs not used: Anyon, Wiseman, Holmes, Goode.
Attendance: 6,859 (326 away fans).