Andy Williams snatched an injury time winner as Rovers survived a major scare against struggling Barnet.
The striker struck deep into five minutes of time added on to secure the win after Barnet came back from two goals down in a brave second half rally.
James Coppinger and Matty Blair had given Rovers a deservedly comfortable lead after a dominant first half.
But Barnet roared back after the break with a goal from Bira Dembele before substitute Luke Gambin looked to have snatched a point four minutes from time.
That did not count for more drama in injury time as Williams slotted in at the near post to keep Rovers second in League Two.
It was a nervy finish that could never have been predicted after a first half which Rovers controlled and Barnet offered very little.
But the Bees responded exceptionally well and managed to wrestle the pattern of play in their industrious favour, looking to take advantage of Sam Muggleton's long throw at every attempt.
Darren Ferguson was forced to make two changes to the side that triumphed at Portsmouth the previous weekend with Frazer Richardson out due to a groin injury and John Marquis serving a one match ban after collecting five bookings.
In came Niall Mason and Liam Mandeville, who netted in Tuesday's Checkatrade Trophy clash with Derby County U21s.
Rovers started on the front foot but struggled to threaten against a resilient and robust Barnet defence.
Coppinger and Matty Blair both hit speculative efforts from distance that failed to trouble Bees keeper Josh Vickers.
But they did grab the lead on 14 minutes with an absolute corker.
Matty Blair's cross was headed out and the ball dropped perfectly for Coppinger who lashed a stunning volley from 20 yards. Vickers could only watch as it flashed past him.
The pattern of the game hardly altered after Rovers went in front.
Barnet had their first moment of true threat when the powerful John Akinde attempted an overhead kick which did not trouble Marko Marosi.
But Rovers continued to dominate possession and territory.
Andy Williams fired high and wide after a fine run to the edge of the box when a pass was perhaps the better option.
The lead was doubled on 32 minutes. Blair collected the ball and darted forward, playing a fine one-two with Williams before calmly firing into the far corner from a tight angle.
Sam Muggleton's long throw was a dangerous weapon for Barnet and full back Bira Dembele flicked just wide from one hurl from close to the half way line.
Rovers looked in full control. Coppinger saw a shot deflected into the side-netting and from the subsequent corner, Williams chested down and volleyed, only to see the effort blocked.
They began the second half in much the same manner as they played the first with Blair and Williams both failing to get the desired connection on half chances.
But Barnet began to wrestle their way into the game and saw much more of the ball in the Rovers half.
Marosi needed to make a smart save on the floor on his line after Bondz N'Gala flicked a header on goal from a corner.
The visitors continued to push and Michael Nelson saw a header strike the bar from a Muggleton long throw.
Barnet's persistence with Muggleton's throw paid off when they pulled a goal back on 63 minutes.
Muggleton launched into the box and Dembele flicked a fine header into the far corner.
Williams was inches away from restoring comfort to Rovers' afternoon when he curled a fine effort just wide from the left corner of the box.
And Ferguson attempted to do the same as he sent on Mathieu Baudry and switched to 3-5-2.
Another fine save from Marosi prevented the equaliser as he rushed out and tipped wide a low effort from substitute Justin Amaluzor.
Rovers should have had a third on 72 minutes. A finely-weighted pass from Jordan Houghton sent Williams on the break but the forward opted to go it alone with Mandeville poised to receive a pass with clear sight of goal.
Barnet's challenge for something from the game appeared to be on the wane.
But they hit Rovers with a hammerblow on 86 minutes.
Another Muggleton long throw was hooked towards goal and substitute Gambin got enough of a touch to take it over the line.
But the game was far from over and Rovers grabbed the winner.
Blair struck a brilliant low cross and Williams darted to the near post to turn home and spark jubilient - and relieved - scenes.
Rovers: Marosi, Mason (Baudry 70), Wright, Butler, Evina, Houghton (Middleton 85), Blair, Rowe, Coppinger (Calder 75), Mandeville, Williams. Subs not used: Etheridge, Garratt, Middleton, Longbottom, Beestin.
Barnet: Vickers, Vilhete, N'Gala, Nelson, Dembele, Muggleton, Watson, Togwell (Nicholls 78), Campbell-Ryce (Gambin 74), Akinde, Akpa Akpro (Amaluzor 57). Subs not used: Stephens, Sesay, Taylor, Payne.
Referee: Trevor Kettle (Rutland)
Attendance: 4,861 (198 away)