After being on the back foot for much of the first half, the Inver Reds kicked it up a gear after the break and were level 10 minutes in through Bent's first goal for the club.
The Gibraltar international was the grateful recipient of Ardit Nika's weak punch and he fired into the empty net with the goalkeeper still on the ground.
The rest of the second period was a game of attrition as both sides pushed for an equaliser but Ferguson came to the fore again when substitute Rin Ahmeti produced a wonderful bit of skill to leave the goal at his mercy.
Larne were dealt a late blow in extra time when O'Neill was given a straight red card for a swinging arm on Diar Halili with three minutes remaining.
They held on to take the game to penalties, but Gallagher's opening effort was saved.
Aaron Donnelly netted to pile the pressure on the hosts in sudden death and Bytyqi's kick was saved by Ferguson.
It was a second shootout win in a row for Larne, who defeated FK Auda on penalties in the opening round.
They also beat Ballkani on penalties in the third round last season on their way to becoming the first Irish Premiership club to reach the league or group stage of European competition.