Barnsley led through a Stephen Dawson, shortly after Millwall's Darius Henderson had missed a penalty, before the hosts had defender Adam Smith sent off for a rash challenge early in the second half.
Chris Wood tucked in his third goal in two matches, and his 11th of the season, 10 minutes from time but Tudgay had the last word as Millwall slipped out of the play-off places.
Millwall were surprisingly lacklustre for a team in such fine form, unbeaten at home in their previous seven games, and it was Barnsley who made the brighter start with two good chances falling to Tudgay in the first 10 minutes.
First Lions goalkeeper David Forde did well to tip Tudgay's shot round the post, then a mix-up in the Millwall defence saw the ball fall to Tudgay again, but this time the striker blazed his shot over the crossbar.
The hosts should have taken the lead in the 25th minute after Henderson was fouled in the area by Scott Wiseman. But Henderson, back in the Millwall side after a spell out with a hamstring injury, blazed the spot-kick over the crossbar.
And the Lions were made to pay five minutes later when Barnsley broke at the other end and the ball eventually fell to Jim O'Brien, whose shot was well saved by Forde, but Dawson was on hand to tuck away the rebound to give the visitors the lead.
Millwall's task got more difficult 10 minutes after the interval when Smith was sent off after he lunged in on David Perkins. It looked like a 50-50 challenge but referee Trevor Kettle deemed it to be two-footed and produced a straight red card.
Barnsley were caught out 10 minutes from time though when Wood latched onto Dany N'Guessan's ball over the top and coolly finished past Steele.
But all Millwall's hard work was undone when Tudgay rifled the winner past Forde in the third minute of added time to lift the Tykes to the same points tally as Tudgay's former side Sheffield Wednesday.