The Bantams, who were expelled then reinstated in the competition, took the lead at Griffin Park when Kyel Reid smashed home, but Marcello Trotta's penalty levelled matters before the break.
After no more goals in 90 minutes, Alan Connell put the visitors ahead from the spot in extra-time.
But Trotta, Clayton Donaldson and Harry Forrester scored as the Bees beat last week's conquerors of Arsenal.
After the original tie finished 1-1, Bradford were expelled from the competition for fielding an ineligible player in Curtis Good, before a successful appeal allowed them back into the cup.
Rampant Rotherham booked their place in the FA Cup third round after overcoming 10-man Notts County 3-0 at Meadow Lane.
The League Two side took the lead after nine minutes when winger Ben Pringle planted a superb 25-yard strike into the top corner.
Rotherham doubled their advantage against their sluggish hosts after 22 minutes when a Pringle corner wasn't dealt with and Mark Bradley swept the ball home.
It went from bad to worse for County on the half hour when defender Damion Stewart was adjudged by referee Darren Deadman to have deliberately elbowed Alex Revell and was handed a straight red card.
It was 3-0 in the 41st minute as Lee Frecklington broke away from the County backline and rounded keeper Liam Mitchell before putting the ball on a plate for Daniel Nardiello to finish.
Two second-half goals earned Oxford a place in the FA Cup third round for the first time in 10 years following a 2-0 home win over Accrington.
James Constable and Peter Leven struck to bring the U's the reward of a home tie against League One high-flyers Sheffield United next month.
In the night's other tie, Barrow and Macclesfield face a replay after a 1-1 draw in their FA Cup second-round tie. The winners will host Championship side Cardiff in the third round.