The 35-year-old has now scored 12 goals in his last eight games in all competitions after the Portuguese ultimately got the better of old rival Zlatan Ibrahimovic despite being largely anonymous for much of the match.
Milan paid for Theo Hernandez's 71st-minute red card as they failed to close out a game they had dominated for long periods and led through Ante Rebic.
Juve will now be favourites to finish the job in the second leg at the Allianz Stadium next month, with a final against either Inter Milan or Napoli up for grabs.
The hosts started strongly, with Ibrahimovic heading over the crossbar inside the first minute.
He continued to be a threat to his former club early on, but could only direct an ambitious backheel flick beyond the far post, before picking up a booking which will see him miss the second leg through suspension.