Australian striker McDonald, a 54th-minute replacement for Curtis Main, headed home Mustapha Carayol's corner in the 87th minute to equalise as Boro hit back from two goals down.
Bradley Pritchard lashed home his third goal of the season after only 32 seconds to give Charlton a flying start before Rhys Williams' own goal in the 17th minute put the visitors firmly in control.
Boro forward Marvin Emnes struck his first goal of the year in the 76th minute to set up a grandstand finish before McDonald's late effort, but Charlton held on to stretch their unbeaten away run to seven matches.
Charlton made a lightning start and were ahead after just half a minute when visiting striker Ricardo Fuller went on a marauding run down the left and pulled the ball back across the penalty area from the by-line for Pritchard to smash the ball home with a right-footed shot, high into the roof of the net from 12 yards.
Boro responded well as striker Carayol blazed a shot just over the crossbar and then forced Charlton goalkeeper Ben Hamer into a fine save with an angled drive from 20 yards.
The hosts were sent reeling again in the 17th minute when Charlton forward Yann Kermorgant fired over a low cross from the right and the ball deflected off Williams into his own net from six yards.
Substitute McDonald had two well-struck shots saved by Hamer and then crossed for Emmanuel Ledesma, who pulled his effort from inside the penalty area just wide.
Emnes threw Boro a lifeline with 14 minutes left, converting Leadbitter's cross from the right high into the net from close range, before being replaced in a tactical switch by Luke Williams.
Boro then salvaged a point as McDonald headed home Carayol's corner in the 87th minute, while there was still time for Carayol and then Danny Hollands at the other end to go close to snatching all three points.
- Sports & Recreation
- Mustapha Carayol
- Bradley Pritchard
- Marvin Emnes