Charlie Austin returned to haunt his former club as he struck in the 89th minute to send QPR above promotion rivals West Brom.
The game looked to be heading for a goalless draw until Austin arrived at the far post to head home Chris Willock's cross.
His goal moves QPR two points above Valerien Ismael's Baggies, who are now without a win in four games.
Karlan Grant went closest for the visitors with a deflected cross which beat debutant goalkeeper David Marshall but narrowly missed the target.
West Brom started the better, with Adam Reach hitting a powerful volley from distance which was deflected wide, before Callum Robinson and Matt Phillips also went close.