The Bantams suffered back to back home defeats for the first time all season after going down by the odd goal to long term title contenders Gillingham.
Despite a bright start to the game, City missed several decent goal scoring opportunities and were ultimately punished when Cody McDonald struck the winner just after the hour mark.
City were denied a goal in the opening minute by an alert low save from Stuart Nelson. Nathan Doyle's ball over the top was flicked on by James Hanson and Zavon Hines got in behind but was halted by The Gills' stopper.
Gillingham's first shot in anger came from the unlikely source of fullback Joe Martin; he received Chris Whelpdale's thrown in to turn infield, he strolled forward unchallenged before forcing Matt Duke into a save with a firm low drive.
James Hanson came close to heading City into the lead when he met Kyel Reid's teasing cross but he couldn't keep his attempt down and the ball passed on narrowly over the bar.
Hanson was winning more than his fair share of aerial challenges and was heavily involved early on; his knock down fell kindly to Nahki Wells but The Bermudian blazed his shot miles over the bar from 18 yards out.
City continued to carve out decent openings and this time Gary Jones tested Stuart Nelson. The skipper's powerful low drive from 20 yards out was parried out as far as Wells who looked set to head home the opening goal but Nelson got back to his feet quick enough to react to his header by tipping it over the bar.
Phil Parkinson's men had clearly been the better of the two sides in the opening 45 minutes but it was Gillingham who opened the second period on the front foot.
A free kick was awarded some 35 yards from Duke's goal and Deon Burton lined up for a speculative shot. The veteran striker's thunderous low drive fizzed only a yard or so wide of the target.
Chris Whelpdale was the next to try his luck and he did well to plant a shot through a crowded penalty area and towards goal but Matt Duke denied him with an impressive stop, considering the amount of play he could see and the time he had to react.
A bouncing ball evaded the attentions of Adam Barrett and Nahki Wells turned away from the former Bournemouth defender but his shot was tame and failed to provide a stern enough test for Stuart Nelson.
Stephen Darby then tried to produce a replica of his long range winner against Burton Albion earlier in the season when he fizzed a shot towards goal from distance after Nathan Doyle had picked him out in space.
The Liverpudlian, though, saw his shot fly a yard or so wide of Nelson's top corner.
Inside the 64th minute, Gillingham took the lead; a lofted through pass by Deon Burton fell between Cody McDonald and Matt Duke, Duke was hesitant and McDonald made no such mistake and rounded him to pass the ball into a completely unguarded goal.
Kyel Reid's crosses were causing problems for the Gillingham back line and his delivery on this occasion was near inch perfect, Hanson rose unchallenged but he couldn't direct his header on target and the ball was thundered a yard or so wide when he really should've scored or tested Stuart Nelson at the very least.
The visitors twice came close to doubling their lead late on through Myles Weston and Deon Burton respectively; Weston's goal bound shot was blocked by Stephen Darby following Charlie Lee's cut back, and Deon Burton's shot from the edge of the area came close also.
Deep into additional time a loose ball deflected off Andy Frampton inside the area and spun marginally wide of the target to spare the experienced campaigner blushes; seconds later Nahki Wells' pull back inside the area evaded everybody after he opted to pass rather than try his luck with a shot.
The Bantams were bright and energetic in the first half, but failure to repeat this in the second half cost them dear as Gillingham stepped their own game up a gear and snatched the winner through Cody McDonald.