Gus Gulfer's side had to deal with forward David Laird going off injured in the first-half. He was replaced by Marvin Birch.
After a goalless first-half, Birch put 'Side ahead on 66 minutes.
Junior Decker then equalised for Bari on 70 minutes as the hosts fought back after going behind.
With 12 minutes remaining Luke With missed a penalty as 'Side's chance of winning the game in normal-time slipped by.
Extra-time was then played to determine the winner and after a goalless first period, Bari won the game on 112 minutes through Senou Kone to fire Chris Davis's side into the next round.
'Side: Sam Roach, Jak Mochalski, Jimmy Nottage, Paul Wright, Leon Smith, George Lutaaya, Michael Ademiluyi, Jason Ajoodha (Jason Fontaine), Luke With (Jide Tijani), David Laird (Marvin Birch), Connor Mitchell.
Subs Not Used: Fionn Glancy, Jack Francis