Man of the match midfielder Craig Disley returned to his former club in style to keep Rovers' play-off hopes alive.
Disley controlled the midfield, created the winner and a hatful of other chances as injury-ravaged Mansfield slipped to their third successive home defeat.
Rovers struggled to take advantage of the youthful Mansfield line-up in the opening half hour and shake off the hangover from their extra-time defeat in the Johnstone's Paints Trophy final a week earlier.
In fact, Mansfield created the better half chances. Rovers' keeper Steve Phillips saving bravely at the feet of Stags defender Alex John-Baptiste from a Matt Hamshaw corner, and then saving Hamshaw's drive after his mazy run past three defenders.
Rovers finally imposed themselves on the game before half-time. The unmarked Rickie Lambert headed Stuart Campbell's curling free-kick straight at Stags' keeper Jason White from just six yards.
Campbell was then given too much space and time inside the area, but his shot was hacked clear by Hamshaw.
Mansfield keeper White got away with an horrendous error when he completely missed a Campbell cross, but just seconds later Rovers grabbed a deserved 35th minute lead after yet another let-off from the resulting long throw.
This time the unmarked Disley drove against the bar from four yards when it looked easier to score, but the rebound was acrobatically hooked in by Steve Elliott.
Nine minutes into the second half Rovers should have doubled their advantage but after Disley's astute pass gave Lewis Haldane space on the edge of the area, the midfielder flashed his low drive into the side netting.
The Stags almost equalised three minutes later against the run of play. Simon Brown weaving his way into the area and driving across the face of goal where both Martin Gritton and substitute Barry Conlon just failed to get a touch.
In a far more exciting second half, Rovers again went close to securing victory when Richard Walker curled a shot just past the upright following clever play from Disley.
Walker then lobbed onto the roof of the net from 25 yards with home keeper White stranded, and John-Baptiste scrambled a Campbell shot off the line.
The Stags almost made them pay for wasting those chances with a fight back in the last 10 minutes with substitute Micky Boulding three times going close to snatching a point. Twice his shots were blocked by Elliott and then he curled wide from 12 yards, but Rovers managed to hang on for vital three points.