Scott opened the scoring early in the first half, following up after Campbell’s initial effort struck the post before McMurray equalised by nipping in in front of a static home defence to score.
Glackin struck early in the second half with a crisp low finish from 12 yards before being red-carded for an incident involving Caolan Loughran.
When the dust finally settled Kennedy sent Coleraine keeper Rory Brown the wrong way from the spot to make it level with half an hour still to play.
However, any hopes Ballymena had of grabbing a sensational win evaporated in the closing stages as the hosts finished strongly.
Campbell added Coleraine's third with just over 10 minutes to play after Ballymena failed to deal with a corner and the points were finally secured deep in stoppage time as Shevlin scored from close range after good play from Lyndon Kane.
So, a hard-fought win for a new-look Coleraine but for Ballymena United it’s back-to-back defeats.