Barca was missing Lionel Messi, Luis Suarez, Ivan Rakitic, Sergio Busquets, Gerard Pique, Ousmane Dembele, Jordi Alba, Samuel Umtiti and Philippe Coutino, as the majority of the club's first-team stars were afforded an additional period of recovery after playing in the FIFA World Cup, while new signing Arturo Vidal is yet to link up with the squad.
In their absence, head coach Ernesto Valverde started Brazilian newcomers Arthur and Malcom against the Rossoneri in Santa Clara, where the Blaugrana dominated proceedings without reward in the first half.
The contest at Levi's Stadium appeared destined for a penalty shootout, but Andre Silva had other ideas, the Portuguese forward beating Marc-Andre ter Stegen at the substitute goalkeeper's near post to win it in the 92nd minute after being found in space by Franck Kessie.
The goal came against the run of play in California, but the result will nevertheless encourage Gennaro Gattuso's men ahead of the new Serie A campaign.
Barca meanwhile will hope to welcome back some of its more established stars when it takes on Sevilla in the Supercopa de Espana.
The reigning LaLiga champion had threatened inside the first minute, Paco Alcacer forcing Gianluigi Donnarumma to concede a corner by making a smart save low down to his right.
Alessio Romagnoli had to be alert 10 minutes later, the defender breaking up a promising exchange of passes between Arthur and Malcom.
Milan's first clear chance fell to Fabio Borini, who saw his shot from the centre of the penalty area blocked by Marlon, prompting half-hearted appeals for handball against the defender.
It was Barca, though, that continued to create the bulk of the opportunities, Malcom narrowly failing to get on the end of a well-judged forward pass from Rafinha in the 19th minute.
On the half-hour mark, Ricardo Rodriguez had to make a timely sliding tackle to prevent Nelson Semedo getting a shot away from a tight angle down the right side of the box.
With nine minutes remaining in the half, Arthur unleashed a fierce drive from outside the area, a diving Donnarumma proving equal to the task of keeping it out.
The onslaught continued as the half-time whistle approached, Malcom hitting the post and Munir El Haddadi whistling an effort from range narrowly wide, with Donnarumma seemingly beaten on both occasions.
As expected, both coaches made several changes during the second half.
Ter Stegen, on for Jasper Cillessen in the Barca goal, had to be alert to deny Hakan Calhanoglu in the 47th minute.
That chance came on the break after Barca had penalty appeals for an apparent stamp by Rodriguez on Rafinha ignored by referee Baldomero Toledo.
Andre Silva, wasted one of the few good chances to arrive in a scrappy second half when he fired into the side-netting after good work from Calhanoglu in the 67th minute.
Ricard Puig should have won it in the 90th minute, the Barca substitute dragging a shot wide after being found unmarked by Semedo's cutback.
Instead it was Milan that snatched the victory, Calhanoglu and Kessie showing considerable composure to carve out the opening for Andre Silva on the break, and the former Porto attacker made no mistake from close range.