The Addicks had led through goals from David Mooney and Deon Burton in the opening 16 minutes, but Rovers clawed their way back thanks to efforts from Jeff Hughes and Chris Lines either side of half-time.
Nicky Bailey eased the home fans' nerves as he found the net in the 68th minute before substitute Akpo Sodje made sure Charlton stay six points behind Leeds with a fourth goal in the 86th minute.
Mooney, on loan from Reading, wasted no time in slotting into the net from close range in the fourth minute and Burton picked himself up to score from the spot after being fouled in the area by Byron Anthony.
Home defender Christian Dailly was punished for a shirt pull on Jo Kuffour and Hughes slotted home the resulting spot-kick and Rovers levelled in the 56th minute when Charlton failed to deal with a Stuart Campbell corner and Lines headed home.
But Charlton went in front through Bailey, who bundled home a rebound after Mooney's header thumped against the underside of the bar and Sodje scored from close range to ensure there would be no late collapse.