Substitute Jason Scotland grabbed a 74th-minute winner for the relegation-threatened Tykes with his third goal in as many games to complete a pulsating second half at the Riverside Stadium.
Middlesbrough have now lost all five of their league games in 2013, and were punished for failing to hold onto their lead after overturning a 1-0 first-half deficit.
Jim O'Brien's deflected effort gave Barnsley a fifth-minute lead, and the home side looked bereft of ideas in the opening period. They improved after the break and fought back through Mustapha Carayol and Curtis Main.
However, having gone in front Boro were punished for resting on their laurels as Scott Golbourne bundled home after Jason Steele failed to deal with Rory Delap's long throw, before Scotland sealed the hosts' fate from an indirect free-kick after the Boro keeper picked up Rhys Williams' back-pass on the edge of his six-yard box.
Only goal difference keeps Barnsley in the relegation places, but Flitcroft was quick to warn his players against complacency.
"It's got to be 46 games and this group of players will not get carried away," he said. "I won't let this group of players get away with anything; that's my job as the manager.
"I don't do people who come to work to be average - I do people who come to work to achieve, whoever that person is.
"The game had everything. Like any great rollercoaster it had a bit of everything in it. Every player played a massive part in that win - that's a special group of players in there.
"This group of players are achieving their potential week in, week out, and that's all I ask. If you give everything you've got you hit the levels of perfection that I talk about to these players. I'm telling this group to become heroes and achieve something that at one stage looked impossible and gets talked about for years to come."
- Sports & Recreation
- Jason Scotland