The Bundesliga leaders were 2-0 down inside 10 minutes of their Champions League quarter-final first leg tie after two defensive blunders. The first saw Jackson Martinez dispossess Xabi Alonso before being hauled down inside the area by goalkeeper Manuel Neuer.
Ricardo Quaresma converted the spot-kick and then doubled his tally soon after after robbing Dante and finishing coolly.
It was a nightmare opening spell for Guardiola who went into the game without injured quartet Franck Ribery, Arjen Robben, David Alaba and Bastian Schweinsteiger.
“We were 2-0 down so early and when that happens it is never easy,” said the former Barcelona boss.
Bayern pulled one back when Thiago Alcantara scored his first goal from open play since February 2014 with a close-range finish.
But Jerome Boateng's second-half lapse in judgement afforded Martinez - back after over a month out with a groin problem - the opportunity to net his seventh Champions League goal of the campaign and leave Bayern with an uphill challenge in the second leg.
Guardiola added: “After we scored, we controlled the match. But if you add everything up, Porto were the better team. 3-1 is a difficult result for the return leg. But we will try everything."