Craig Beattie, a striker Boro boss Tony Mowbray once signed for West Brom, was the man who?emerged from the bench to complete a sensational turnaround in the 94th minute that left the hosts red faced and sitting five points above the bottom three.
Boro had looked like giving their survival chances a boost when they cruised in to a 3-1 lead seven minutes after half-time.
But then the Swans, who climb to fourth, battled back to earn an unlikely victory.
Boro defended atrociously after Dutch winger Marvin Emnes had delivered the early blow to the promotion chasers.
That arrived inside eight minutes and it took Swansea six minutes to level things up.
Nathan Dyer's electric pace got him in behind the defence to slot beyond goalkeeper Jason Steele after an neat return pass with Luke Moore.
But Dorus de Vries, the Swansea keeper, had already been forced to deny Lita?moments before Jonathan Grounds arrived in the box to flick Barry Robson's free-kick over the line with a neat header.
When Lita pounced in the area unmarked to direct another Robson centre high in to the Swansea net seven minutes after the restart, there looked to be no way back for the men from Wales.
But then Julio Arca clumsily pushed substitute Joe Allen down in the area and Scott Sinclair converted a precise penalty beyond Steele's outstretched right hand with half an hour left.
When Ashley Williams was on hand to poke an equaliser over the line with 22 minutes remaining after more defensive woe, Middlesbrough were on the verge of losing the lot.
And they did. Beattie crashed a low drive from 20 yards in to Steele's bottom right corner to claim an amazing win that left Mowbray searching for further solutions.
MIDDLESBROUGH (4-4-2): Steele; McMahon, Hines, Grounds, Bennett; Robson, Bailey, Arca (Smallwood 85), Emnes; Lita (Franks 75), McDonald (Zemmama 75). Subs: Ripley (gk), Haas, Boyd, Halliday.
SWANSEA CITY (4-5-1): De Vries; Rangel, Williams, Tate, Richards; Dyer, Pratley (Dobbie 57), Britton (Allen 57), Gower, Sinclair; Moore (Beattie 75). Subs: Ma-Makalamby (gk), van der Gun, Serran, Augustien.
Source: Northern Echo
Source: Northern Echo