The result means that Antonio Conte's team surrendered top spot in Group C to Roma and could now face a daunting prospect in the knockout stages.
United turned the game around with two goals in two minutes from Romelu Lukaku and Marcus Rashford to progress to the last 16 as Group A winners. At first glance, the Russian appeared to be offside, but replays showed he had been played onside by Daley Blind, who had slid off the pitch as he attempted to cut out Fernandes' pass.
Juventus won 2-0 at Greek champions Olympiakos, but still finished three points behind Barcelona in the standings.
Which teams are through to the Champions League Round of 16 stage?