The Londoners will feel justice was done following Bradford's shock reprieve, after twice coming from behind to seal a tie at Southend.
They became the first side to beat the Bantams in a cup match this season in the replay, which followed the 1-1 draw in which City fielded ineligible player Curtis Good and initially saw them booted out of the competition.
Brentford boss Uwe Rosler said he was "perplexed" by the FA U-turn which gave his side little time to prepare for the tie.
His worst fears looked like coming true after Kyel Reid, returning after a lengthy lay off with a groin injury, put the Bantams ahead on the half hour when he smashed home a loose ball from 12 yards.
On-loan Fulham striker Marcello Trotta levelled just before the break, firing home from the penalty spot after he was fouled by City defender Carl McHugh.
Former Bee Alan Connell made it 2-1 to the cup specialists in extra time when he converted from the spot after a Shaleum Logan foul on Blair Turgott.
But Trotta pounced again, firing a left-footed drive home into the top corner to equalise.
Substitute Clayton Donaldson made it 3-2 to the hosts by slotting home Harry Forrester's cross, before Forrester sealed it late on with a cool finish in the bottom corner.