The Spaniard gave Caleb Porter a one-fingered wave-off, apparently angry at some of the tackles by the MLS players as the German champions were beaten 2-1.
Guardiola offered the refereeing panel a token handshake and quickly disappeared into the tunnel.
The acrimonious ending overshadowed a brilliant first half goal by Polish striker Robert Lewandowski that gave Bayern the lead.
Lewandowski, who moved to the Bundesliga champions from Borussia Dortmond in the close season, struck a piledriver from just outside the box into the roof of the net that beat MLS keeper Nick Rimando with sheer pace.
But substitute Bradley Wright-Phillips scored an equally impressive goal in the 51st minute when he latched onto a through ball and hammered a left-foot shot into the far corner from about 20 metres.
Landon Donovan then snatched the win for the All-Stars with a right-foot shot from 10 metres in the 70th minute.
Most of the Bayern first-team regulars started on the bench in the team's sixth pre-season game.
In the 79th minute, four of Germany's World Cup-winning team - Bastian Schweinsteiger, Philipp Lamm, Thomas Muller and Mario Gotze - came on simultaneously in a mass substitution, though Schweinsteiger left the game before the end after a challenge that may have prompted Guardiola's subsequent ire.
"I understand he doesn't want his players to get hurt. They're not great tackles but they're not the worst tackles I've ever seen and I hope Schweiny's not hurt," Donovan told ESPN.
"I'm not sure why they're going after the officials."
In the 86th minute, Dutch star Arjen Robben came on as Bayern ended the game with almost a full-strength line-up, but the All-Stars held on to record the win.