Zinedine Zidane's men have now won just one of their last five games as a Danilo own goal and Daniel Wass' finish led to elimination from the Copa.
Arsene Wenger's men looked set to drop two crucial points after Andre Gray converted from the spot, before the Chilean saved the day.
The skipper made history by scoring his 250th goal for the Red Devils in the 94th minute of stoppage time as the visitors extended their unbeaten run.
Los Blancos got back to winning ways in La Liga on Saturday afternoon after losing their previous two games in all competitions.
The Poland international was on target in the first half to cancel out Haberer's opener and struck again in injury time to decide the encounter.
Jonny and Iago Aspas made the difference for the visitors as they hit either side of Marcelo in a frantic six-minute spell that decided the encounter.
The Swede came to the rescue of team-mate Paul Pogba, who had been cast as the villain of the piece with an awful handball to give away a penalty.