The 2-1 victory left Milan five points behind leaders Inter but put them four points ahead of champions Napoli.