Gerhard Struber's side earned their first away victory of the season to edge a tough contest in the capital as the Reds lifted themselves off the foot of the Sky Bet Championship table.
Patrick Schmidt's 93rd minute header sealed a vital and long-awaited on-the-road triumph for Barnsley in a game they looked to have been denied in when Aidan O'Brien had levelled up for Millwall as we approached the last five minutes.
Conor Chaplin had given Struber's men the lead with a first half finish against the run of play.
The Austrian coach had made just the one alteration to last weekend's starting lineup with Aapo Halme returning from injury and replacing Kenny Dougall at the base of the midfield diamond. The Australian midfielder was missing from the 18 altogether as the Reds named just six substitutes.
In a first half that lacked much quality, the hosts, unbeaten in their last seven fixtures were in the ascendance for the first half-hour, taking advantage of a lacklustre looking Barnsley side but not quite creating the openings to hurt the Reds.
There was a litany of free-kicks awarded to the home side, with referee Jarred Gillett quick to blow up and this gave Millwall the chance to swing in a lot of crosses, but other than a header from ex-Red Tom Bradshaw that flew just a foot wide of goal, the Lions struggled to make the breakthrough that their play probably warranted.
As we closed in on the half time interval, with around 40 minutes on the clock, Barnsley broke down the right flank with Jacob Brown cleverly turning his marker before, with his weaker left foot sending over a low cross that was met first time by Chaplin whose sweet finish bamboozled the hosts' 'keeper and dropped into the far corner to give the Reds a lead their display had scarcely deserved.
It could have been 2-0 just a minute or so later when the ball ran nicely for Chaplin as he attacked the box and from 10 yards out the pint-sized striker unleashed a powerful strike that Bartosz Bialkowski could only fist to safety.
HALF-TIME: Millwall 0-1 Barnsley
The second half saw a much more impressive Reds performance as they came back out all guns blazing and after a fine run and cross from Clarke Oduor, a superb volley from Brown with the outside of his right boot was saved well, low down by Bialkowski.
It was Alex Mowatt next up to test the Polish goalie who once spent a loan spell with the Reds. The Reds' captain tried a bending effort from 25 yards out but Bartosz got a finger to it and despite Cauley Woodrow teeing up Mowatt for a second go, the follow up was smashed well over the crossbar.
Bradshaw stabbed over from inside the six-yard box as the home side tried to rally, and with the arrival off the bench of giant striker Matt Smith, it became less like football and more like headball.
Mike Bähre made way for Luke Thomas midway through the half and with 10 minutes remaining, Woodrow was subbed off for Schmidt. But the hosts had been launching balls into the box incessantly and eventually, the chance arose for an equaliser.
It was that man, Smith who rose to meet a cross from the left wing, his header towards goal was turned home by fellow substitute O'Brien who looked to be just onside, right in front of Reds 'keeper Sami Radlinger.
But instead of deflation, the Reds rallied as four minutes of stoppage time was announced.
Alex Mowatt burst through on goal in the 92nd minute and instead of slipping in Chaplin to his left, he went for goal and was thwarted once more by Bialkowski. But the Reds weren't to be denied...
After Millwall cleared towards the left wing, Thomas nipped in and robbed his man, floated a ball into the home side's box and Schmidt leapt like a salmon to flick home a header that fell nicely into the corner giving Bialkowski no chance for more heroics.
There were joyous scenes at full-time as players, staff and fans alike celebrated a first away win of the season, their second successive league victory and the third of Struber's short tenure so far.
Barnsley moved off the foot of the table at long last, up to 22nd in the table and just a point from safety as they move on to enjoy Christmas before welcoming league leaders, West Bromwich Albion to Oakwell on Boxing Day.
FULL-TIME: Millwall 1-2 Barnsley
Reds: Radlinger (GK), J.Williams, Andersen, Diaby, Oduor, Halme, Bähre (Thomas), Mowatt, Brown, Woodrow (Schmidt), Chaplin.
Unused Subs: Collins (GK), Sibbick, Styles, B.Williams.