Pato, who almost joined Paris Saint-Germain this month before committing himself to the Italian champions, struck 10 minutes into extra-time after the 90 minutes ended 1-1 at the San Siro.
He then suffered the latest in a long line of injuries late on but Milan hung on with 10 men, having used up all their substitutions, to beat Serie A's bottom side and set up a quarter-final with Lazio scheduled for next week.
Holders Inter Milan host Genoa on Thursday in the final last 16 tie.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.