More on KentOnline
An injury time goal left the Gills beaten just seconds after they looked to have won a point.
Both teams had a player sent off after late drama at Stadium MK.
Two goals in the opening 10 minutes put MK Dons in the driving seat.
Cody McDonald pulled one back after the break and the Gills levelled through Josh Wright in the last minute.
Seconds later Dean Lewington won it for MK, with Bradley Dack sent off for a second yellow in the mayhem.
Defeat - a fourth in a row for Ady Pennock's men - leaves the Gills just one place above the bottom four – the lowest they have been all season.
Gillingham were two places and three points above the League 1 drop-zone before the weekend. A win was badly needed but they left with nothing.
Reaction: First team coach Steve Lovell says defeat was a travesty.
There were three changes for the Gills, with defender Zesh Rehman back in following suspension, Harry Cornick making his first start and Ryan Jackson returning to the XI.
Gills’ preparations weren’t helped when their playing tops were left behind in Kent, turning up just in time for kick-off.
Their arrival didn’t help the Gills as they conceded two early goals.
Robbie Muirhead got the opener after five minutes, his goal coming just moments after Tomas Holy had denied him from close-range. He netted from 20 yards, picking out the top corner as the Gills defence backed off.
They doubled the lead after 10 minutes. Kieran Agard flicked the ball into the path of Harvey Barnes and he bent the ball past Holy.
Bradley Dack was Gills’ best hope of a goal in the first half. He came close with a corner that keeper Lee Nicholls had to punch off his line and then a shot that was deflected wide.
Gillingham had Holy to thank for keeping it at 2-0. MK’s forwards were queuing up to increase the lead, with Agard and George Baldock both denied with a great double save from the Czech keeper, who was the last man standing for Gills.
It was a brighter showing from the Gills when they returned for the second half.
Lee Martin should have done better with an early chance after the home keeper only got a minimal touch on a cross, but the shot went wide of the post.
MK had been coasting and were made to pay for their approach, as McDonald turned home Martin’s cross with 56 minutes gone, to half the deficit.
The game was on a knife edge and Holy did well to deny Agard after Barnes whipped in a dangerous cross.
At the other end McDonald had a glorious chance to level. A great ball from Dack left him with just the keeper to beat, but Nicholls saved.
Gillingham continued to look a threat, switching to a wing-back formation for the last 10 minutes.
MK sub Dean Bowditch shot over with three minutes left after Holy had saved Ben Reeves’ free-kick with his shoulder.
In the final minute McDonald was fouled in the box by George Williams, who was sent off for the challenge. Wright had his spot-kick saved but he converted the rebound.
Just as the Gills thought they had salvaged a point, MK went right down the other end and restored their lead, with Lewington lobbing Holy. Dack picked up a second yellow card amid the home team’s celebrations.
MK Dons: Nicholls, Williams, Lewington, Walsh, Reeves (Downing 90mins), Baldock, Upson (Potter 70mins), O’Keefe, Barnes, Agard (Bowditch 70mins), Muirhead. Subs not used: Burns, Ngombo, Brittain, Maynard.
Gillingham: Holy, Jackson (List 78mins), Oshilaja, Ehmer, Rehman, Wright, Byrne, Martin (Donnelly 90mins), Dack, Cornick (Parker 78mins), McDonald. Subs not used: Nelson, Hessenthaler, Quigley, Muldoon.
Attendance: 8,807 (650 Gills)