The home side took the lead with just 29 seconds on the clock when David Perkins hit an angled drive from just inside the Bradford area that beat Scott Loach and found its way just inside the far post.
The visitors were almost level five minutes later when a terrific free-kick routine ended with Eddie Johnson striking the post.
But Bradford did pull level on the hour, when Tom Kennedy fouled Joe Colbeck and Peter Thorne converted the penalty.
Rochdale’s winner came in the 86th minute when a throw-in from the right was flicked on by Lee Thorpe and substitute Adam Le Fondre was onto it in a flash, whipping a snapshot across Loach into the bottom corner.
In time added on, Mark Bower hit the bar with a header.