The visitors took the lead through Ethan Pinnock, from a corner deep in first-half stoppage time in controversial circumstances, with well over the indicated additional time played and United down to 10 players due to Matthijs de Ligt being treated for a head injury.
Alejandro Garnacho produced a stunning equaliser on the volley, soon after half-time, as Erik ten Hag's team hit back. Rasmus Hojlund's second goal of the season capped an excellent performance from him and put United into a lead that was never relinquished.
Further chances could have extended the lead but for Brentford goalkeeper Mark Flekken, who made a number of saves throughout the game.