ROTHERHAM United manager Steve Evans was left stunned as to how his side had not defeated the league leaders.
A brace from former Rotherham striker Deon Burton helped Martin Allen’s side achieve their first win in four and go five points clear of Port Vale and 10 points above fifth-placed Rotherham.
The 36-year-old converted Charlie Lee’s throw-in against the run of play in the 11th minute and Burton’s solo effort extended the lead in the 57th before Jason Taylor’s 18-yard shot gave Rotherham hope in the 69th.
Gillingham held on even after Brighton loanee Romain Vincelot had to be fitted with a neck brace and withdrawn on a stretcher after a challenge with Taylor.
Rotherham manager Evans said: “I struggle to find the words to explain why we’ve not won the game, not just got something out of it. We were the dominant side from start to finish.
“We’ve had to watch the theatrics that, if it was us, I’d be in the stands in the second half and my players would be off the pitch.”
Gillingham chief Allen said: “We took our chances and every one to a man played their part, Rotherham are the form team, and they’ve some good players.
“Romain was knocked out and when you’re the manager it’s horrible, but he had his eyes open when I saw him on the touchline and it was a big relief. I’ve got to say a big thank you to the Rotherham supporters who clapped him off to a man. I think he’ll be okay.”
Rotherham United: Warrington, Mullins, Arnason, Sharps (O’Connell 18), Ridehalgh, Nardiello (Odejayi 89), Taylor, O’Connor (Cameron 63), Frecklington, Pringle, Revell. Unused substitutes: Shearer, Hunt, Agard, Rooney.
Gillingham: Nelson, Fish, Barrett, Frampton, Martin, Payne (Montrose 70), Allen, Lee, Vincelot (Dack 80), Burton (Weston 71), Kedwell. Unused substitutes: Forecast, Jackman, Birchall, McKain.
Referee: A Haines (Tyne & Wear).
Man of the match: Deon Burton.