The Town boss saw his side dominate the first half and go into the break ahead courtesy of Simon Ferry's goal.
But Brentford rallied after the introduction of substitutes Sam Saunders and Bradley Wright-Phillips and when Clayton Donaldson was hauled down in the box by goalkeeper Wes Foderingham, Saunders smashed the resulting penalty down the middle to bring the Londoners level.
Then Donaldson, who had missed a gilt-edged first-half chance, was in the right place to run on to Wright-Phillips' ball forward and lash home at the near post from a tight angle.
MacDonald felt the scrappy end to the game suited the Bees and led to his side's late surrender.
"We got very, very sloppy in the second half and particularly the last 25 minutes, and that was exactly what they wanted," said MacDonald.
"We're still in the mix for an automatic promotion spot because there's a long way to go, but lapses like this don't help. Once they got the momentum it was always going to be difficult.
"We dominated for almost the whole game but once we lost our impetus we struggled to regain it and Brentford took advantage. I'm very disappointed because for most of the game they were second best."
- Sports & Recreation
- Sam Saunders
- Clayton Donaldson
- Wes Foderingham