QPR stayed on course for automatic promotion thanks to a last-gasp equaliser from striker Paul Furlong in injury time at Oakwell.
In a see-saw contest Rangers were trailing 3-2 but forced a left wing corner deep into stoppage time and, when the Barnsley defence failed to clear, Furlong swung his left boot to send the ball in off the far post.
The Tykes had taken a 22nd minute lead following a good in-swinging corner from left back David Murphy, on-loan from Premiership Middlesbrough.
Antony Kay could not convert at the far post but the ball ran loose to home skipper Craig Ireland who drilled in from eight yards.
Barnsley were dealt a blow five minutes later when experienced keeper Marlon Beresford suffered a back injury, which saw Danny Alcock brought on for his home debut.
And Alcock was involved in a blunder that led to a Rangers equaliser on 31 minutes.
He and Kay got into an almighty tangle and the ball came off the Barnsley defender and, according to the assistant referee, crossed the line.
QPR were the better side for most of the second half but had to wait until the 74th minute before taking a 2-1 lead.
Again Alcock was at fault, failing to deal with a cross into the six yard box and Furlong took full advantage to bundle the ball in from close range.
Barnsley sent on striker Daniel Nardiello and the substitute, on-loan from Manchester United, made it 2-2 on 85 minutes with a clinical finish.
And when Murphy curled in a superb 88th minute free-kick Barnsley's play-off hopes were rekindled.
But Rangers had the final say, Furlong popping up in injury time to make it 3-3.