Vitinho had put CSKA ahead before half time, despite the ball appearing to come off Alan Dzagoev, who looked two yards offside.
United turned the game around with two quick second half strikes from Romelu Lukaku and Marcus Rashford.
Basel, who beat Benfica 2-0, finished as runners-up.
Chelsea missed out on first place in Group C, after a 1-1 draw at home with Atletico Madrid. Roma’s 1-0 win over Qarabag, means they win the group and Atletico drops into the Europa League.
In other matches, Juventus beat Olympiakos 2-0, Barcelona defeated Sporting Lisbon 2-0, Bayern Munich saw off PSG 3-1 and Anderlecht won 1-0 at Celtic.