Guy Moussi struck deep into injury time to break Barnsley's stubborn resolve and earn Nottingham Forest their fifth consecutive victory.
The midfielder fired home in the 93rd minute following a clever knock-down from substitute Dele Adebola and was then sent-off as he picked up his second booking of the game for jumping into the City Ground crowd to celebrate.
Barnsley had won their previous three outings themselves after being revived by the appointment of Mark Robins.
And, while Forest had hit the post twice during the match, the Tykes themselves could have snatched it if not for the heroics of Lee Camp, who made several important saves.
It was Barnsley who almost drew first blood as Iain Hume bent a spectacular free-kick over the defensive wall and against the bar from 20 yards.
But, while the winger also sent a volley narrowly wide of the post, it was largely Forest who were left scratching their heads at how they managed to reach half-time without scoring.
David McGoldrick flicked a close-range effort high up against the post after Dexter Blackstock had headed a Chris Cohen cross back into the danger zone.
McGoldrick was also denied by a brave, sprawling save from Luke Steele after an outstanding pitch-length pass from Wes Morgan had sent him racing clear from wide on the right.
The Barnsley keeper also seemed to push a swivelling left-foot shot from Dexter Blackstock against the post in first half injury time.
Paul Anderson also fired inches wide of the post with an angled strike across the face of goal - although Jon Macken offered a reminder of Barnsley's threat on the break as he forced a smart save from Lee Camp with a low, skimming effort.
After the break, Tyson fired wide when sent clean through on goal.
But Barnsley had a five minute spell of pressure of their own, in which they could easily have scored, with Adam Hammill denied by Camp after connecting with a crisp shot and firstly Stephen Foster and then substitute Julian Gray coming close with headers.
At this point, it was Forest who dominated possession - but still Barnsley came close again with Camp producing an outstanding stop to thwart Emil Hallfredsson.
But then Moussi popped up to secure three points for the home side and take them firmly into the promotion race.