Colombia striker Bacca bagged his first with a diving header after 38 minutes but three minutes into the second half Torino, coached by Sinisa Mihajlovic who was sacked by the Rossoneri last season, were level when Andrea Belotti headed home at San Siro.
Two more goals from Bacca, the second from the penalty spot, saw him complete his hat-trick and put Milan in control, but Torino made things interesting when Daniele Baselli made it 3-2 in stoppage-time before the visitors were awarded a penalty in an incident which saw home defender Gabriel Paletta sent off.
However, Belotti, who won the penalty, saw his spot-kick saved by 17-year-old Donnarumma as Milan ensured Vincenzo Montella made a winning start to the league campaign after his appointment in June.
It was not such a good day for new Inter Milan coach Frank de Boer, though, as his side crashed to a 2-0 defeat at Chievo.
Valter Birsa bagged both goals in the second half to leave De Boer, who replaced Roberto Mancini as coach less than two weeks ago, with much to ponder.
There was goals and drama aplenty in Atalanta, where visitors Lazio held off a second-half fightback from their hosts to claim a 4-3 victory.
Lazio looked to be cruising as goals from Ciro Immobile, Wesley Hoedt and Cristiano Lombardi put them 3-0 up inside 34 minutes, but a quickfire brace just after the hour by Franck Kessie brought Atalanta back into it.
Lazio made it 4-2 in stoppage-time through Danilo Cataldi but they were made to sweat for the points after Atalanta hit back again through Andrea Petagna.
Australia attacker Chris Ikonomidis was an unused substitute for Lazio.
Last season's runners-up Napoli were also given a scare, needing a second-half double from Dries Mertens to salvage a 2-2 draw against Serie A new boys Pescara at Stadio Adriatico.
First-half goals from Ahmed Benali and Gianluca Caprari had put Pescara, promoted via the play-offs after finishing fourth in Serie B, in control but Mertens struck twice in the space of three minutes just after the hour to drag Napoli level.
Genoa also had to stage a fight back before beating promoted Cagliari 3-1. Marco Borriello's 67th-minute goal put the visitors ahead but Genoa responded with three goals in the final 11 minutes from Olivier Ntcham, Diego Laxalt and Luca Rigoni to take the points.
Bologna got their campaign off to a winning start after beating newcomers Crotone 1-0 with a late Mattia Destro goal, while Luis Muriel's 38th-minute effort earned Sampdoria a 1-0 triumph over an Empoli side who lost Massimo Maccarone to a late red card.
It was a similar story at Palermo, where visitors Sassuolo claimed a 1-0 win thanks to Domenico Berardi's 32nd-minute penalty before the hosts had Slobodan Rajkovic sent off in the closing stages.