Gillingham forward Joe Gbode came off the bench to score the only goal of the game at Priestfield to put a huge dent in AFC Wimbledon’s automatic promotion chances.
Gills, who are now unbeaten in seven games under Gareth Ainsworth, went in front just after the hour when Gbode produced a powerful effort from inside the box to beat goalkeeper Owen Goodman.
The visitors had created chances to go ahead themselves, the first falling to Joe Lewis, but his header from a James Tilley free-kick cleared the crossbar.
Alistair Smith also came close but his drilled effort from the edge of the box was struck wide of the left-hand post.
Those missed opportunities proved costly just after the hour when Remeao Hutton threaded through a nice pass for Bradley Dack.
The midfielder picked out Gbode, whose first-time effort flew into the back of the net.
Johnnie Jackson’s side sent men forward in the closing stages, but the hosts defended resolutely to claim back-to-back home wins.
AFC Wimbledon remain in the play-off places with two games to play.