Striker Scott Partridge struck a dramatic late winner for Bath.
Barnet dominated and Scott Tynan saved well to deny Liam Hatch - but the Bees striker made no mistake three minutes after half-time.
Hatch, returning to the side after recovering from a dislocated elbow, struck with a left-foot strike.
The well-travelled Partridge equalised for Bath with a shot from the edge of the Barnet penalty area before scoring the winner from Jimmy Benefield's pass.
Barnet: Tynan, Hendon, Yakubu, King, Clist, Strevens, Lopez, Sinclair, Graham, Hatch, Grazioli (Roache 87).
Subs Not Used: Maddix, Millard, McBean, Batt.
Goals: Hatch 48.
Bath: Perrin, Rollo, Bailey, Jones, Power, Sykes, Ford (Coupe 64), Owers, Benefield, Partridge, Williams.
Subs Not Used: Tweddle, Shuttlewood, Evans, Hulbert.
Booked: Jones, Owers.
Goals: Partridge 65, 90.
Att: 2,147
Ref: G Sutton (Lincoln).