Linfield fought back to secure a Showgrounds victory after David Cushley's superb opener for Ballymena.
Cushley was close to the touchline and just inside the Blues half when he sent a brilliant volley over keeper Ross Glendinning and into the net.
Sean Ward chipped keeper Alan Blayney to start the second-half comeback and Andrew Waterworth made it 2-1 with his first away league goal since April.
Guy Bates volleyed in a late third as Linfield moved up to third.
This was a crucial result for Linfield and manager David Healy after collecting just four points from the previous six league games.
The visitors made a bright start with Blayney keeping out efforts from Paul Smyth and Niall Quinn.
Cushley's memorable strike on 35 minutes was the latest in a long list of sublime goals from the midfielder.
Ward's equaliser on the hour mark galvanised Linfield and Blayney made a superb save to deny Jimmy Callacher.
Waterworth ended his away drought with a deflected strike from close range to make it 2-1.
The last action of the game saw substitute Bates hit the net and seal a win which leaves Linfield 11 points behind leaders Crusaders.
What they said
Linfield midfielder Jamie Mulgrew said: "It was a massive game for us - some people were questioning our character and will to win.
"But we showed that in abundance in the game. We contained Ballymena and upped the quality in the second half to score three goals.
"We need to make Linfield a force again. The title is Crusaders' to lose but anything can happen."