The match-winner came in the second period of extra-time when the Sheffield goalkeeper Paddy Kenny was desperately unlucky to be credited with an own goal.
When a Mido shot was deflected onto a post, Kenny had the misfortune to push the ball over the line in a despairing attempt to save.
It was a cruel blow to Kenny who had thwarted Boro on previous occasions.
Middlesbrough will now play another Championship side, Cardiff CIty, at the Riverside Stadium on Sunday March 9.
Brazilian Afonso Alves was in Middlesbrough's starting line-up following his club-record £12million signing. Former Boro defender Ugo Ehiogu was among the United substitutes.
Boro began strongly and Alves missed the chance to be an instant hero when he failed to connect with a header.
The ball was in the air too often in the early stages of the game, with limited flowing football from midfield to entertain the crowd.
The best early move came when England winger Stewart Downing fired just past the far post after combining well with Fabio Rochemback.
The Blades were putting up a spirited fight but, astonishingly, neither goalkeeper was called to make a save in the opening half-hour.
Middlesbrough created the better scoring chances without providing a cutting edge, although on one occasion Kenny saved from Luke Young with an outstretched leg.
United began the second half with more determination though as they looked to punish Boro for failing to cash in before the break.
Both teams introduced substitutes and there were bookings on either side as the frustration increased.
The introduction of Gary O'Neil lifted Boro and Kenny was forced to make good saves from Downing and Tuncay in quick succession.
James Beattie looked a potential match-winner for Sheffield United in the 89th minute but he shot just wide from four yards, a lucky escape for Boro.
All along it looked as though one goal would settle the issue and, to the relief of the home crowd it arrived, albeit in cruel circumstances for Kevin Blackwell's hard-working side.