Leading through Gary O'Neil's direct free-kick, Boro looked to be heading for the fourth-round draw as they dominated the second half at the Pirelli Stadium.
But a dramatic late brace from striker Shaun Harrad turned the game on its head and ensured Burton's passage from the third round for the first time in their history.
Harrad equalised with eight minutes left when he ghosted between Boro's two centre-halves to head home Adam Bolder's right-wing cross.
And the striker grabbed a winner in the second minute of stoppage time when he took advantage of some more sloppy Boro defending.
Scott Malone delivered a free-kick from the left, and after Matthew Bates failed to clear his lines, an unmarked Harrad hammered home from ten yards out.
Boro boss Tony Mowbray left David Wheater out of his 18-man squad for the game, and the in-demand centre-half is close to completing a permanent move to Bolton Wanderers.
Wheater is understood to have been talking to Bolton officials today, and while Wolves and Stoke are also interested in acquiring his services, Trotters boss Owen Coyle appears to be leading the race for his signature.
BURTON (4-5-1): Legzdins; Austin, Stanton (James 46), Moore (Phillips 56), Malone; McGrath (Pearson 52), Bolder, Penn, Webster, Maghoma; Harrad.
Subs (not used): Poole (gk), Boertien, Young, Hughes.
MIDDLESBROUGH (4-4-2): Coyne; McMahon, Bates, Hines, Bennett; Hoyte, O'Neil, Bailey, Arca; Boyd (Franks 83), Lita.
Subs (not used): Ripley (gk), Kink, Halliday, L Williams, Smallwood, Park.