Simon King volleyed a dramatic late goal for Barnet to seal their 13th Conference win this season and stretch their lead at the top to seven points.
Giuliano Grazioli put Barnet ahead from close range but on-loan Jonny Dixon equalised from Darren Barnard's cross.
Barnet keeper Scott Tynan stopped Aldershot taking the lead and Richard Graham capitalised by putting the visitors 2-1 up with a right-foot shot.
Dixon fired a second equaliser but Barnet defender King had the last word.
Aldershot: Bull, Warner (McLean 75), Barnard, Jinadu, Giles, Nick Crittenden, Watson, Challinor, Clarke, Dixon, Sills.
Subs Not Used: Glasspool, McAuley, Peters, Antwi.
Booked: Clarke, Warner, Sills.
Goals: Dixon 35, 76.
Barnet: Tynan, Hendon, Yakubu, King, Clist, Strevens, Lee, Sinclair (Lopez 90), Graham, Grazioli, Hatch.
Subs Not Used: Millard, Maddix, McBean, Batt.
Booked: Sinclair, Hendon, Hatch.
Goals: Grazioli 7, Graham 67, King 83.
Att: 3,494
Ref: D Deadman (Cambridgeshire).