Defender Jamie McCombe turned from hero to villain as Bristol City missed out on the chance to go top of the League One table.
With Nottingham Forest losing to Scunthorpe earlier in the day, a win for Gary Johnson's side would have put them on the summit.
That looked to be the probable outcome for the visitors when McCombe's first-half volley put them in front at the break - his first City goal.
But the former Lincoln City defender was guilty of a lapse in defence midway through the second half when he hauled back Clive Wijnhard allowing Kevin O'Connor to level matters from the spot.
The home side looked the brighter in the first half and Jo Kuffour tested City keeper Adriano Basso with a stinging shot before Thomas Pinault saw his effort deflected over the bar.
Basso was certainly the busier of the keepers and had to be alert on 22 minutes to hold onto Paul Brooker's volley when the City defence failed to clear.
Phil Jevons flashed a snap shot wide for the visitors before Wijnhard blew a golden chance to put Brentford in front on 38 minutes.
The former Leeds striker chested down Kuffour's telling cross, only to scuff his volley high over the bar.
And they were made to pay for that miss when Jamie McAllister's cross found McCombe to volley in from close range.
But Brentford refused to lie down and deservedly got back on level terms in the 66th minute through O'Connor's penalty, the captain coolly sending Basso the wrong way
It was the first goal City had conceded in six hours and 45 minutes of football and their unbeaten five game run suddenly looked under threat, although sub Cole Skuse was unfortunate not to put them back in front on 74 minutes.
Enoch Showunmi's shot fell kindly to the midfielder whose goalbound effort was cleared off the line by former City defender Matt Heywood.
That miss almost cost City the game as Brentford striker Kuffour, who caused problems all afternoon, came agonisingly close to an injury time winner when his header from a Ryan Peters cross fell inches wide of the right-hand post.