Stunned City were scratching their heads after leaving a drenched Griffin Park empty-handed.
Nathan Elder headed Brentford's winner in stoppage time with virtually the last touch of the game to seal a dramatic finish.
Brentford had grabbed the lead after 88 minutes through Marcus Bean, only for Michael Boulding to level seconds later.
A point was the least City deserved having hit the post through Nicky Law and been denied by two fine second-half saves from Brentford's on-loan keeper Mikkel Andersen.
But the draw was snatched away when Elder nodded home a free-kick to condemn City to their fifth away defeat against top-ten opponents.
City's bright performance in the first 45 minutes defied the tricky conditions. As the rain poured down throughout, the visitors tried to play their football and created some decent chances.
The best fell early on to Peter Thorne after a lovely pass from the recalled Paul Arnison but City's top scorer was unable to keep his shot down.
Steve Jones put a couple of chances wide and Boulding fired over while on-loan Reading keeper Andersen tipped away a low drive from Omar Daley, back from injury on City's left wing.
Brentford's best opportunities both fell to Nathan Elder, with the big centre forward just glancing wide on the stroke of half-time from a corner which City argued should not have been given following a fine tackle from Graeme Lee.
City, with Paul McLaren prominent in midfield, almost broke the deadlock just after the hour from a free-kick inside the penalty area given for a backpass. But, for the second week in a row, Law was frustrated by the woodwork.
Jones was a constant threat with his pace and he was denied a first City goal by a fine save from Andersen.
And the big Dane came to Brentford's rescue again five minutes from time with a brilliant tip-over from Boulding's header.
That save looked even more crucial when Brentford grabbed the lead late on as Marcus Bean drove in from the edge of the box. City were back level in a minute with Boulding thrashing home his ninth goal of the season - but Brentford still had the final say through Elder.
CITY: Evans, Arnison, Lee, Clarke, O'Brien, Jones, Law, McLaren, Daley, Thorne, Boulding. Subs: Bower, Conlon, Moncur, Nix, McLaughlin.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article