Goals from John Marquis, Mallik Wilks and Danny Andrew helped Rovers secure only their third win at Gillingham in 32 attempts.
Rovers turned on the style at times for one of there more accomplished performances of the last couple of months and the scoreline could arguably have been wider.
Grant McCann made changes to his starting XI for the first time in four matches with Matty Blair replacing the injured Shaun Cummings at right back. Tommy Rowe came in for his first league starting since September 1 with Ali Crawford dropping to the bench while James Coppinger sat out the fixture with Alfie May back among the starters.
Reflecting Rovers' lack of fit bodies at this time, youngsters Myron Gibbons and Rieves Boocock were named on an inexperienced bench which also included Shane Blaney.
Police incident Woodhouse Sheffield: Two men and a woman injured after large fight breaks out on Market Square
Sheffield fire: Crews tackle blaze in Wharncliffe Woods near Oughtibridge as heatwave continues
Sheffield fire: Video shows firefighters battling blaze at Wharncliffe Woods near Oughtibridge
Sheffield Crown Court: Here are the biggest cases from the last week including paedophile sting
Sheffield father poured petrol over daughter and tried to set her on fire
It was a tame opening to the game and it was not until the 25th minute that Rovers managed an effort on target with Rowe sending a tame effort straight at Tomas Holy.
Play from both sides was scrappy and there was little in the way of goalmouth incident over the opening quarter, though Rovers were the quickest to settle.
And they soon got their opening.
Rovers may pride themselves on attacking fluency that is pleasing on the eye but they will take a scrappy goal whenever it comes.
After working the ball up the pitch superbly, it then all became a little chaotic in the build-up to their 28th minute opener.
Ben Whiteman and Tommy Rowe both saw shots blocked before a follow-up clattering into Marquis, who somehow got the ball under control to shoot with his effort deflecting beyond Holy to give Rovers the lead.
The goal gave Rovers freedom to express themselves and they delivered some of their best attacking play for some time.
Passing was crisp, quick and incisive to keep them constantly in the Gillingham half and the hosts' defending grew all the more desperate as Rovers pushed on.
The hosts threatened only in patches, usually with breaks forward that did not amount to much.
And for all Rovers' good pressure and tempo, their own opportunites were half chances with Wilks curling wide and Marquis hooking off target after latching onto a loose ball.
To Rovers' credit they maintained an excellent tempo even as they were increasingly frustated.
And that continued after the break, at which point Gillingham introduced towering striker Tom Eaves, who had caused plenty of problems for Rovers in the reverse fixture.
But before the forward could have any impact, Rovers increased their advantage.
If the build-up to the first was chaotic, the second was calamitous.
It seemed as though a through ball from Marquis would roll back harmlessly towards the goalkeeper. But confusion between Holy and Alex Lacey presented enough of an opportunity for Wilks to nip the ball away and slot into an empty net.
By the hour mark, they were out of sight.
A Herbie Kane corner was only half cleared with Andrew chesting the ball down and smashing an effort from 25 yards which nestled into the bottom corner.
The game looked to be done and dusted with Rovers looking the more likely to add to their score.
Andrew, Marquis and Rowe all threatenedÂ the goal in the later stages.
But Gillingham were not entirely finished and grabbed a goal back in chaotic fashion typical for the game.
Eaves powered a back post header off the bar, Ian Lawlor saved a follow-up but Callum Reilly darted in to make sure the ball crossed the line.
Boocock was handed his Rovers debut off the bench in the dying minutes.
Lawlor produced an excellent save to keep out a Mark Byrne effort and prevent a grandstand finish as Rovers deservedly took home the points.
GILLINGHAM: Holy, Fuller (O'Neill 58), Zakuani, Lacey, Ogilvie, Byrne, Reilly, Parrett (Bingham 25), Parker, List, Hanlan (Eaves 46). Subs not used: Hadler, Garmston, Mbo, Rees.
ROVERS: Lawlor; Blair, T Anderson, Butler, Andrew; Kane, Whiteman, Rowe (J Anderson 84); May (Boocock 90), Marquis, Wilks (Crawford 76). Subs: Marosi, Blaney, Lund, Gibbons.
REFEREE: Neil Hair (Cambridgeshire)
ATTENDANCE: 4,791 (272 away)