Michael Chopra had opened the scoring early in the first half only for Gareth Roberts to bring the visitors level just after the hour.
After a week of turmoil, it was back to football without Joe Ledley, who was in hospital having a hip operation.
Peter Whittingham switched inside and Chris Burke, a late substitute at Ashton Gate, returned to the wing.
Gabor Gyepes kept his place in the centre of defence with the news that club skipper Mark Hudson would be out for up to ten weeks with an ankle injury.
Rovers fielded three Wales internationals in Roberts, Brian Stock and John Oster, while former Cardiff loanee James Chambers was also in the visiting line-up.
City went ahead in the ninth minute when Whittingham slotted a superb pass through to Chopra.
He brought the ball down in one movement before smashing a right-foot shot into the far corner of the net across goalkeeper Neil Sullivan.
Two minutes later Bothroyd should have doubled the lead but he fired over following a Chris Burke cross..
Midway through the half Bothroyd sent Chopra racing through but Sullivan came out quickly to block his shot.
Rovers worked their way back into the game but in the 27th minute Chopra missed another gilt-edged opportunity when he fired wide with only the keeper to beat.
With half time approaching, Ross McCormack struck the outside of the post after another pinpoint cross from Burke.
David Marshall pulled off a fine finger-tip save two minutes into the second half when James Coppinger let fly from 20 yards.
Rovers' midfield began to dictate play and with City's defence coming under severe pressure, it was no surprise when Oster swung a pass out wide to Roberts, who rifled an angled drive beyond Marshall for the equaliser on 64 minutes.
City boss Dave Jones tried to stem the flow by bringing on Kevin McNaughton and Solomon Taiwo for Burke and Kennedy but still the visitors poured forward looking for the winner.
Against the run of play, City snatched an injury-time winner when a Whittingham corner was bundled in by Bothroyd after a fumble from Sullivan.
Cardiff City Official Website