Birthday boy Lewin Nyantanga was Barnsley’s unlikely hero as his dramatic injury-time winner secured a fine comeback win at The Den.
The defender headed home right at the death as the Reds climbed to seventh in League One.
Fred Onyedinma’s deadly double looked to have rescued a point for the Lions, but the hosts were tamed thanks to goals from Sam Winnall, Alfie Mawson and Nyatanga’s late winner.
Onyedinma gave the hosts a 26th minute against the run of play, but striker Winnall equalised for the Reds six minutes before the break with a clinical header.
And then centre-back Mawson lashed home with a stunning strike 11 minutes after the restart.
But Onyedinma bagged a second goal, with a clinical header, eight minutes from time.
However, there was still time for Nyatanga to snatch a winner as he made sure his 27th birthday celebrations ended in style.
The Reds rode their luck at the end of the first half as the home side heaped on the pressure.
But a much more composed second-half performance by Johnson’s team saw them rightly take the lead.
Johnson had made two changes to his side from the weekend’s 1-0 home win over Burton Albion.
Arsenal loan youngster Dan Crowley and last season’s leading scorer Conor Hourihane made the starting line-up, while left-back George Smith and Manchester United loan midfielder Joe Rothwell both dropped to the substitute’s bench.
New signing Reece Wabara was also included as a substitute having recently signed a short-term deal with the South Yorkshire club.
Marley Watkins came close to giving the visitors the lead but keeper David Forde produced a smart save to thwart him.
Midfielder Crowley rifled wide of the target with a powerful 20-yard drive two minutes later and then set-up Winnall but the hit-man blazed over.
The Reds then went behind. They failed to clear Ed Upson’s right-wing cross and Onyedinma poked home from close-range.
Shaun Williams went agonisingly close to doubling the Lions’ lead three minutes after the opener, but his right-foot shot flew wide of the left post.
Tony Craig had a headed goal ruled out for offside as the Reds’ breathed a collective sigh of relief, only for goalscorer Onyedinma to shoot over.
Ben Pearson cleared off his own goal line after the break and then skipper Mawson put the Reds ahead with his fine strike.
Watkins wasted two great chances in the second period and Mawson’s goal looked to have won it, only for poor defending to allow Onyedinma to equalise.
Nyatanga, though, had other ideas and made sure of the three points as the Reds claimed a second league win in a row.
Millwall: Forde, Cummings, Nelson, Ferguson (Martin 90), Onyedinma, Abdou, Williams (Thompson 61), Upson (O’Brien 61), Gregory, Morison.
Subs: Cowan-Hall, Archer, Marquis, Webster.
Barnsley: Davies, Bree (Wabara 58), Roberts, Mawson, Nyatanga, Scowen, Pearson (Rothwell 83), Hourihane, Watkins, Winnall (Wilkinson 90+2), Crowley.
Subs: Townsend, Smith, R. Williams, Digby.
Referee: Dean Whitestone (Northamptonshire)