
Milan are second in the standings on 43 points, three behind rivals Inter Milan and three clear of Napoli in third, while Como are sixth with 34 points.
Como made the brighter start and took the lead after 10 minutes when Marc-Oliver Kempf rose to head home a corner.
Despite the hosts controlling much of the first half, Milan struck in stoppage time as Christopher Nkunku calmly converted from the penalty spot after Kempf was penalised for pushing Rabiot.
Milan goalkeeper Mike Maignan produced a series of strong saves to keep Como at bay after the break before Milan took the lead in the 55th minute when Rabiot knocked the ball in from close range.
Como were denied an equaliser as Nico Paz saw his effort from outside the box crash against the crossbar. Milan then sealed the win two minutes from time when Rabiot caught the Como defence off guard with a low strike from distance that crept into the bottom corner.