The Sky Bet League One side appeared to be heading into the Capital One Cup third-round draw after taking a deserved 2-0 lead with the Black Cats in tatters.
However, with the home fans voicing their disapproval, manager Paolo Di Canio sent on Wickham in place of the hapless Ji Dong-won and ultimately saw his move pay off.
Patrick Bamford on loan from Chelsea, had blasted the visitors into a seventh-minute lead with his third goal in four games, a rasping long-range drive.
It could have been even worse for the Black Cats, who needed keeper Vito Mannone to keep out a glancing header from team-mate Cabral and enjoyed a rare slice of good fortune when striker Izale McLeod fired just wide inside a turbulent opening 20 minutes.
But they did fall further behind within 10 minutes of the restart when Izale McLeod produced the cheekiest of finishes to extend his side's lead and put them within touching distance of victory.
A much-changed Sunderland, who misfired badly for much of the contest, gave themselves a lifeline with 12 minutes remaining when Jozy Altidore made the most of Wickham's through-ball to claim his first goal for the club, but the fireworks had only just begun.
Wickham dashed MK Dons' hopes of hanging on to their lead when he converted full-back Ondrej Celustka's cross four minutes from time and the tie looked to be heading into extra-time.
But the Ipswich striker snatched even that crumb of comfort from Karl Robinson's men when his 89th-minute shot deflected off defender Ben Reeves and flew past wrong-footed keeper Ian McLoughlin.
In the space of 11 minutes, the mood inside the Stadium of Light had altered dramatically, and there was more to come for the home fans six minutes into added time when Adam Johnson cut in from the right and drilled home a fourth from the tightest of angles.