Linfield maintained their two-point lead at the top of the Premiership thanks to a last-minute headed goal by defender Albert Watson.
Philip Lowry was denied an early penalty appeal by referee Mark Courtney and Rory Patterson hit the woodwork in the first half with the goal gaping.
Daryl Fordyce fired past the post and Lowry had the ball in the net but his effort was ruled out after a foul.
Michael Doherty made a fine save from a Lowry shot before Watson's winner.
In the opening minutes, Lowry appeared to have been brought down by Doherty but Courtney waved away penalty appeals.
Patterson should have scored before half-time after the Coleraine goalkeeper collided with one of his defenders.
Midfielder Lowry thought he had given his side the lead when he found the net but the referee ruled that there had been an earlier foul on the goalkeeper.
The Blues' dominance paid off with Watson's late winner.