The Magpies took an early lead when Jon Stead fired in from the penalty spot after Izale McLeod was impeded.
John Akinde's penalty levelled the scores following Mike Edwards' foul on Michael Gash, before Mark Randall fired the hosts ahead from inside the area.
Andy Yiadom added the Bees' third shortly after with a shot that deflected in over keeper Scott Loach.
Media playback is not supported on this device
Barnet manager Martin Allen told BBC Radio London:
"We changed out team around and put most of our subs from the weekend out in the game.
"We created a lot of chances in the first half without really playing that well. They had absolutely nothing. We just totally destroyed them."
Barnet scored three second-half goals to earn a comfortable win over Notts County in League Two.