Mark Warburton's side recorded a fourth-successive win as two goals in the final nine minutes subjected Fulham to a first league defeat since Kit Symons took full control last month.
A tense first half failed to produce a goal, but three minutes before the hour Fulham took the lead through Hugo Rodallega, the Colombian converting Ross McCormack's cross.
Their lead lasted until the 81st minute as Brentford's pressure finally told, Harlee Dean firing a Stuart Dallas delivery into the top corner from the edge of the penalty area.
With full time approaching, and a draw looking likely, Brentford snatched all three points as Jota Peleteiro's strike deflected off Dan Burn in stoppage time.
Meanwhile, Cardiff City moved closer to the play-off positions with a 2-1 victory over 10-man Reading.
After two games without a win Russell Slade's side got back to winning ways thanks to two goals in the first half, with Reading defender Alex Pearce having 45 minutes to forget.
The 26-year-old diverted a Peter Whittingham corner into his own net on 20 minutes, and in first-half injury time he was shown a straight red card for fouling former Reading striker Adam Le Fondre in the penalty area, referee James Linington consulting with his assistant before dismissing the centre-back.
Whittingham duly converted the spot-kick, his fifth goal of the season, and although Michael Hector pulled one back for the visitors they slumped to a seventh defeat in their last 11 league matches.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
Get daily World Cup 2022 news, updates and other football frolics to your inbox
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.