Mark Perrow reports from Meadow Lane
Jay Emmanuel-Thomas came off the bench to score the latest of late winners from the penalty spot to send City up to third in Sky Bet League One.
The hosts started brightly and capitalised on a defensive mix-up to score first through on-loan Wolves winger Zeli Ismail on 13 minutes.
But City responded well to the early setback, probing for an equaliser long before Aaron Wilbraham supplied it on the hour from Mark Little’s cross.
Still Steve Cotterill’s side continued to press, and Wilbraham thought he had won it five minutes from time only to be denied by an offside flag.
But that was not to be the end of the drama, as the lively Luke Freeman was fouled deep into added time to allow Emmanuel-Thomas to casually roll home a dramatic winner.
Manager Cotterill handed a debut to Kieran Agard up front, with Joe Bryan replacing Greg Cunningham in the only other change from last week’s draw at Rochdale.
Wade Elliott captained the side for the first time as City settled into life without departed former skipper Sam Baldock.
There was to be a chance for the new man inside 40 seconds, as Wilbraham chased a long ball from Derrick Williams and found Little, whose cross from the right reached Agard unmarked only for the striker to make a weak connection and present Roy Carroll with an easy save in the County goal.
But the hosts, attacking the their noisy Kop Stand in the first half, were up for the fight and keen to get one over former boss Cotterill.
Veteran midfielder Gary Jones volleyed over before Ismail profited from a misunderstanding at the back to open the scoring.
What looked an innocuous long ball forward became dangerous when Aden Flint and Luke Ayling left it for each other, allowing nippy winger Ismail to steal a march and race away to slip the ball past Frank Fielding.
City’s response was bright enough, though. Flint’s header back across goal looked perfect for Derrick Williams only for the Irishman to miss his kick, before Little surged into the box and shot too close to Carroll.
Meanwhile, Freeman, who scored his first goal for the club at Spotland, was looking even sharper eight days later.
First he rifled a shot narrowly over the crossbar, before a presentable free kick opportunity culminated in a measured strike against the angle of post and bar.
But for one defensive lapse City had performed well for the most part, only to come within a whisker of falling two behind when Liam Noble let fly from distance with a rising drive which was only just too high.
The Robins started the second half with similar intent as Little embarked on a customary run down the right, but when Agard checked his run for a pullback, the wing-back sent a low ball across the face of goal to no one in particular.
At the other end, there remained signs of vulnerability. Noble ran at the defence and selfishly shot wide from 20 yards when a simple pass to his left would have left Jake Cassidy with a clear route to goal.
But City remained the greater threat and finally hauled themselves level on the hour mark. Again sparked by Little, his run into the area resulted in a better ball for Agard, who missed his kick before the ball ran through to Wilbraham to convert from close range.
From then on City were determined to go one better. Freeman and Elliott both came close from distance, while Little continued to cause panic down the right flank.
Fielding needed to be alert to save from Ismail with his legs in a rare County breakaway, but it was the visitors threatening a winner.
It was a winner that looked to have arrived five minutes from time when Emmanuel-Thomas, on for Agard, split the defence with a perfect through ball for Wilbraham, who ran through to round Carroll and find the net only to be denied by a late offside flag.
Still there was time for more drama, as Freeman was brought down by Curtis Thompson in the 94th minute to pave the way for Emmanuel-Thomas to break his duck for the season and send over 900 travelling fans into delirium.