The Tykes were cruising following an opening goal from Paddy McCourt and two from Chris O’Grady before the visitors made a game of it with two late goals from Albert Adomah.
After McCourt netted with a fine solo effort, Barnsley doubled their lead five minutes before the break when substitute Jim O’Brien’s shot from the edge of the area was deflected past goalkeeper Jason Steele by O’Grady.
In Barnsley’s next attack, striker Marcus Pedersen was tripped by central defender Ben Gibson. Referee Oliver Langford pointed to the spot and O’Grady made no mistake.
Eight minutes from the end, Middlesbrough managed to pull a goal back when Adomah fired in from 15 yards. Two minutes later he scored his second with a low header from four yards out.
Flicroft said: “We’ve got three points against an outstanding team. They had elite players going forward and in the second half they went for it and we stuck firm. I am delighted we got the three points.
“I am very proud that we didn’t collapse at the final hurdle. We’ve got a plan; we know where we want to be in the league table at the end of the season.”
McCourt had to be substituted with a knock soon after scoring, with O’Brien his replacement.
But Flitcroft was struck by the quality of the goal scored by the Northern Irishman and expects more to come this season.
“It was an incredible goal,” Flitcroft said.
“When he gets the ball there he’s unpredictable. When he gets in the box you’ve got to be careful not to bring him down. I believe he will take the Championship by storm.”
Middlesbrough boss Tony Mowbray could not believe his side were three down at half-time.
He said: “It was 3-0 and we should have scored have scored some goals in that half. We had a couple of chances in the first half but we didn’t take them.
“I’ve been showing them clips all week of the skill that McCourt has and they foul him.
“The second goal was a long-range shot that took a deflection. Things just don’t go for us, and you wonder why we can’t get one like that. The penalty was a rash decision from a young player.
“At hal-time we needed to get some pride in the second half. We came out and took a couple of chances. I can’t remember our ‘keeper making a save. But (Lukas) Jutkiewicz hits the bar with only their ‘keeper to beat.
“We have scored enough goals to be higher in the table but I have to solve the problem of goals going in.”