The opening 20 minutes of the contest saw three goals scored and an Alan Judge-missed penalty, as quickfire strikes from Clayton Donaldson and Marcello Trotta cancelled out Callum Wilson's early goal.
Alan McCormack established a two-goal cushion for the hosts early in the second half as the Bees strengthened their grip on an automatic promotion place.
Baker then conceded a penalty by fouling Judge in the area, only for the Irishman to fluff his lines from 12 yards and watch his spot kick saved by Joe Murphy.
Mark Warburton's team were buoyed by the missed opportunity and soon turned the game on its head. Donaldson poked past Murphy to restore parity before his strike partner fired the hosts ahead just three minutes later.
McCormack drove the Londoners into a two-goal lead two minutes after the interval by striking a bouncing ball beyond the reach of Murphy, as Brentford keep the pressure on Wolves at the summit.