Dougie Freedman's men went ahead inside the opening two minutes thanks to Liam Fontaine's own goal but were pegged back by Steven Davies' leveller after the break.
In an end-to-end second half, the visitors snatched a crucial three points when Craig Davies struck home the spot-kick after David Ngog was brought down in the area by substitute Matthew Bates.
The hosts came into the game knowing victory was imperative in their attempts to avoid relegation, but made a calamitous start with Fontaine inadvertently putting the ball into his own net after 84 seconds.
Darren Pratley, who returned to the Bolton starting line-up in place of Mohamed Medo, sent a seemingly innocuous ball across goal only for Fontaine to get a decisive touch past Tom Heaton.
City manager Sean O'Driscoll made two changes ahead of the game with Lewin Nyatanga and Sam Baldock coming in for Bates and Paul Anderson, and his side responded positively to the early setback.
Liam Kelly almost embarrassed visiting goalkeeper Adam Bogdan with a sliced cross which looped narrowly wide nine minutes later, moments before Stephen Pearson blazed over when given space inside the Bolton penalty area.
The Trotters had won seven of their previous nine games but looked off the boil in the opening stages with Jay Spearing's 29th-minute effort their best attempt, flying wide of Heaton's right-hand upright.
Albert Adomah spurned a further opportunity to get the hosts back on level terms before Bogdan was called into action, doing well to divert Davies' effort to safety after the former Derby striker had tried to slide the ball under the keeper.
Pratley tested Heaton with a long-range effort which need parrying over the bar soon after the interval before the Robins found the equaliser they deserved.
After picking Marcos Alonso's pocket on the right wing, Adomah delivered a pinpoint cross from the byline to Davies who made no mistake with a simple downward header, his 13th goal in only 18 starts.
The visitors then had a penalty shout waved away by referee Mark Haywood in the 73rd minute when Zat Knight's header appeared to strike Bates' arm.
Bates was in the centre of the action again six minutes later when he brought down Ngog inside the area. After Haywood once more ignored Bolton's protests, the assistant referee awarded the spot-kick which Davies smashed down the middle into the roof of the net to seal a crucial victory.
O'Driscoll's men worked tirelessly to steal a late point but were left perilously close to the drop after their seven-game unbeaten home run came to an end.