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 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.
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.
Albert Adomah spurned a further opportunity to get the hosts back on level terms before Bogdan was called into action, doing well to divert Steven 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 Matthew 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.