The visitors were the better side for much of a dour first half but fell behind when Alex MacDonald put the ball past his own goalkeeper.
Wednesday were better after the break, but Barnsley continued to pose problems and it was only when Sam Hutchinson fired home with 10 minutes remaining that the result was put beyond doubt.
Hutchinson was then involved in an incident that saw Barnsley substitute Adam Hamill sent off and visiting manager Paul Heckingbottom and home coach Lee Bullen sent to the stands as a fiery second period provided a stark contrast to the first 45 minutes.
“Let me give congratulations to my players, the way they played the game – they did a fantastic job,” said Carvalhal.
“Second, let me tell you this Barnsley team is a very tough team to play against. They’re special away; they’re very, very dangerous.
“The more respect that I can talk about Barnsley is that this is one of the first times that I’ve changed the system – we played differently today because we must control them and block them. It was important to block them because they play with two attackers.
“I think we prepared very well. I’m happy my team understands the moments of the game very well.
“I saw my team try to press up, try to play fast attack, sometimes all the players back together, not taking one goal when we were winning 1-0 and try to get the second.
“And I saw my team after the second goal and when Barnsley had 10 players press high and moving the ball until the game finished. These kind of things I like in my team.”
The game started slowly but Keiren Westwood rushed out well to deny Tom Bradshaw after some woeful defending saw the Barnsley forward race clear.
Steven Fletcher headed an Adam Reach corner wide and then wriggled clear in the box after 36 minutes but dithered over his shot and the opportunity passed.
It did not matter, however, as a minute later a suitably scruffy goal gave the home side the breakthrough. Lucas Joao outjumped the Barnsley defence and his flick was inadvertently turned into his own net by MacDonald.
Bradshaw spurned two more opportunities before Hutchinson converted from 12 yards following a Ross Wallace corner to double Wednesday’s lead.
Hammill was then sent off for a two-footed challenge on Hutchinson that sparked brawls both on the pitch and the touchline, with Bullen and Heckingbottom sent to the stands – although the Barnsley manager was surprised not to see Hutchinson also given his marching orders.
“I’m disappointed, obviously,” said Heckingbottom. “I’m satisfied with the performance and the application of the players. I thought we were good from the first to the last minute.
“You get what you deserve and Wednesday won 2-0, they deserved to win because they took their chances.
“My frustration is I saw the ref give Sam (Hutchinson) a red card, and then I knew Adam had been sent off, but it wasn’t until I got upstairs that I realised Wednesday had 11 men. I know I saw him give him a red card.
“I think me and Bully will end up suffering for mismanagement. When you turn around after an incident and there’s four or five of their staff in your technical area and the fourth official trying to get them out it’s only going to end one way.”