Two second-half goals from Luke Norris handed all three points to the visitors, who were able to head home celebrating their first win on the road in League One since March.
The 2-1 victory also saw Peter Taylor’s side stretch their unbeaten run to six games.
But Paul Dickov’s team are now without a home win since September 20 and will rue their inability to convert the number of chances they had to end that miserable run on Saturday, despite Curtis Main ending the goal drought at home with a stoppage-time penalty.
Gillingham’s Stuart Nelson was the busier of the two goalkeepers in the early stages, saving strongly from James Coppinger and Kyle Bennett.
Norris fired wide from a good position, but it was Rovers who looked the more comfortable and enjoying the better chances, Main firing in from the edge of the area before Bennett’s deflected effort was blocked.
The visitors continued to remind their hosts, however, of the threat they posed and went close again through Joe Martin’s 20-yard effort which flew over.
After the break, Gillingham came out with more purpose and their adventurous nature was rewarded in the 51st minute when Norris was allowed to fire home at the back post after Michael Doughty’s cross went across the face of goal unchallenged.
Doncaster rallied and created a number of good chances, Coppinger going closest.
At the other end, Andy Butler headed wide from point-blank range before Gillingham doubled their lead in the 77th minute with Norris’s clinical finish.
A consolation of sorts was gained after Robinson was upended in the box, with Main stepping up to slot home.
Doncaster Rovers: Johnstone, Wabara, McCullough, Butler, Stevens, Coppinger, Keegan (Forrester 57), Wellens, Bennett, Robinson, Main. Unused substitutes: Evina, Marosi, Wakefield, De Val Fernandez, Whitehouse, Jack McKay.
Gillingham: Nelson, Legge, Egan, Ehmer, Hessenthaler, Doughty, Loft, Dack (Galbraith 79), Martin, Dickenson, Norris. Unused substitutes: McDonald, McGlashan, Pritchard, Lennon, Bywater, Hoyte.
Referee: G Salisbury (Lancashire).
Man of the match: Richie Wellens.