The Australian scored his first goal in five games for the Teessiders to take a late 1-0 lead at Huddersfield Town but the visitors then conceded in the 86th minute before an injury-time 25-yard effort forced a 2-1 win to the Terriers.
McDonald's 11th league goal of the campaign came 12 minutes from time when he fired home a left-footed attempt to make it three goals in two outings against Huddersfield this season.
Manager Tony Mowbray was gutted after the match, saying his side desperately had to get things right in order to push for a promotion playoff spot.
"I wouldn't have been happy with a point but to lose the game is unbelievable. There was not a lot of quality but we came in with a clean sheet at half-time," he said.
"Then we got the goal and had a few half chances and looked reasonably comfortable. Then with a corner kick and a header and they are back in it.
"We have to analyse it and work out how we put it right."