Dwane Lee scored twice and made another as Barnet pulled off a fine win.
Scott Golbourne volleyed City ahead in the 14th minute, but two minutes later Lee equalised with a deflected shot.
Lee netted at the far post on 52 minutes to put Barnet ahead, before a brilliant solo effort from Nicky Bailey made it 3-1 five minutes later.
Substitute Michael Bridges gave City hope in the 64th minute only for Lee to cross for Lee Roache to seal Barnet's win seven minutes from time.
Bristol City: Phillips, Carey, Partridge (Bridges 62), Fortune, Golbourne, Murray, Skuse, Grant, Grant Smith, Brooker, Stewart.
Subs Not Used: Jamie Smith, Cotterill, Orr, Keogh.
Goals: Golbourne 14, Bridges 64.
Barnet: Flitney, Hendon, King, Charles, Gross, Bowditch (Norville 77), Bailey, Lee, Graham, Grazioli (Roache 73), Strevens.
Subs Not Used: Batt, Tynan, Soares.
Booked: Hendon, Gross.
Goals: Lee 17, 53, Bailey 58, Roache 81.
Ref: P Armstrong (Berkshire).