Juventus, who beat Milan in last season's semi-finals, rested goalkeeper Gianluigi Buffon and playmaker Andrea Pirlo as usual in the Cup while Milan were beset with injuries.
El Shaaraway put Juventus ahead when he found the bottom corner from the edge of the penalty area after Kevin-Prince Boateng pulled the ball back. Their lead lasted for only six minutes when Giovinco curled a free kick into the top corner from 20 metres.
In an even match, second-half substitute M'Baye Niang nearly headed a win for Milan, who also had Riccardo Montolivo's free-kick charged down with the last kick before full time.
Montenegro striker Vucinic struck the decisive blow five minutes into extra time when he exchanged passes with Paolo De Ceglie and poked the ball past Marco Amelia as Juventus avenged their Serie A defeat by Milan in November.
Buffon's replacement, Marco Storari, foiled Milan at the death when he somehow managed to stop Bakaye Traore's powerful volley from 12 metres.
"It was a strong response after last Sunday and I'm pleased we got that out of our system," said Juventus coach Antonio Conte, whose side suffered a shock home defeat by Sampdoria at the weekend.