United had taken the lead on 16 minutes when Paul Pogba volleyed in from close range after Alexis Sanchez had headed against the post.
But Arsenal responded well and former United midfielder Henrikh Mkhitaryan equalised six minutes into the second half with a drive into the bottom corner.
United pushed for a winner and after Marcus Rashford's goal was ruled out for offside, substitute Fellaini scored with the back of his head to seal victory.
Second-placed Man Utd are now five points clear of Liverpool in third and are guaranteed a place in the top four.
Arsenal remain in sixth, three ahead of Burnley, who have played one more match.
Man Utd: 4 May v Brighton (A)
Arsenal: 6 May v Burnley (H)