Darren Boyce headed home from a Matthew Tipton cross in the 86th minute to give Ballymena victory over Warrenpoint.
Town took the lead on the half hour when Daniel Hughes coolly finished low into the bottom corner after running onto a pinpoint Ruairi Devlin pass.
Tipton levelled seven minutes later, side-footing home after meeting a low right-wing cross from Mark Surgenor.
John McGuigan, Stephen Hughes and Daniel Hughes were denied by Tim Allen, before Boyce grabbed the winner.
The Sky Blues move above derby rivals Coleraine into seventh place after winning three league games in a row for the first time this season.
Early in the game, Daniel Hughes headed wide while Allen made a fine stop from McGuigan's deflected long-range shot.
Jonathan Parr turned away a Tipton header and twice denied Eamon McAllister.
Hughes's curling finish, his 15th of the season, was just reward for his side's early efforts, but Tipton's clinical finish restored parity soon after.
Warrenpoint created the better opportunities after the break but a combination of poor finishing, good goalkeeping and a goal-line clearance denied them a goal.
Boyce's third goal in four matches proved decisive and Barry Gray's side remain in the promotion-relegation play-off position.