Mark Haughey scored a late winner as Linfield came from behind to secure three precious Premiership points.
Bottom club Warrenpoint took the lead in the 13th minute when Stephen Hughes crossed from the right and his brother Daniel finished past Ross Glendinning.
Linfield put in an improved display after the break and Andrew Waterworth smashed in a 71st-minute equaliser.
Defender Haughey snatched Linfield's victory by heading in Michael Carvill's cross in the 89th minute.
The result leaves fourth-placed Linfield two points behind leaders Portadown and champions Cliftonville.
It was a worrying afternoon at Milltown for Blues boss Warren Feeney but in the end his side remain unbeaten in nine away matches.
The visiting supporters booed Linfield off at the break as Warrenpoint deservedly held a half-time advantage.
Daniel Hughes finished well in front of goal for Town's score and it could have been 2-0 but for a superb blocking challenge by Jamie Mulgrew after Ruairi Devlin's pass had set up Stephen Hughes.
Linfield finally got going in the second half and levelled when a pass by Aaron Burns found Waterworth who produced a superb finish.
Warrenpoint, with just two league wins all season, were denied a point as Haughey headed his late winner.
Remarkably, it means three of the central defender's four goals for Linfield have been winners against Warrenpoint.