Goals from Reece James and Brad Halliday saw Doncaster end Gillingham's impressive run with a 2-1 win.
Rovers dominated possession throughout and looked the greater threat against their physical visitors.
But Kyle Dempsey's equaliser early in the second half demonstrated the fragility of the lead.
Doncaster worked the ball well in the opening period, with Matt Smith, Tyreece John-Jules and Taylor Richards all having efforts blocked.
But they broke the deadlock in the 29th minute. John-Jules brought down a ball on the edge of the box and laid off to James who stabbed in first time.
Gillingham boss Steve Evans shuffled his side at the break to bring them into the game.
And they made it count when Dempsey fired in a low effort from 25 yards after 51 minutes.
But the score did not stay level for long. Ben Whiteman saw a shot saved by Jack Bonham, only for Halliday to charge in and slam home the loose ball.
Halliday and Fejiri Okenabirhie both went close to giving Doncaster a cushion in the latter stages.