Billy Chadwick gave the Blues the perfect start firing home on eight minutes.
The Sky Blues tied things up on 37 minutes as Dougie Wilson headed home from a corner.
As we approached half-time Christy Manzinga headed over from a Jordan Stewart cross.
The home side took the lead nine minutes into the second half as Jude Winchester fired in after Kenny Kane had held the ball up.
Jordan Stewart should have levelled the tie with 12 minutes to go after Ahmed Salam’s initial effort was blocked but the winger failed to finish.
The Sky Blues wrapped the win late on as Leroy Millar fired in a third in the 92nd minute.
Danske Bank Premiership leaders Cliftonville also fought back to seal a 2-1 win after extra time at Portadown.
The Ports broke the deadlock at the start of the second half as a long kick out by Barr was misjudged by the Reds defence allowing Adam Salley to get a shot away, Decland Dunne could only parry his effort and Lee Bonis was on hand to fire home the rebound.
Joe Gormley headed against the bar before Ronan Doherty levelled on 76 minutes. With no more goals in normal time it was on to extra time with Daniel Kearns firing home the winner for the Reds in front in the 97th minute.
At Milltown the tie was over at half time as Warrenpoint Town raced into a 5-0 lead against Limavady United before winning 6-1 in the end.
Alan O’Sullivan fired the hosts in front on two minutes before Thomas Maguire added a second six minutes later.
The home side grabbed a third on 25 minutes as McCaffrey set up O’Sullivan for his second of the night.
O’Sullivan turned provider minutes later to set up Stewart Hutchinson for the fourth.
Maguire made it five before the break before O’Sullivan completed his hat-trick from the spot.
With the game fizzling out Matthew Brown scored a late consolation for the visitors.