Porto carry a weighty advantage to Munich for Tuesday's return leg at the Allianz Arena while Bayern have a glimmer of hope after their away goal, but still need to score at least twice at home.
"That result is a surprise and we knew it wouldn't be easy against a side who control possession," said Porto captain and goal-scorer Jackson Martinez.
"But we took our chances and proved that we can play too.
"I don't feel 100 percent still, but I trained hard in the last few days and was pleased to get a goal," he added having missed the previous six weeks with a hamstring injury.
In Munich, Porto will be without Real Madrid-bound defender Danilo, who is suspended after picking up a late yellow, but they deserved their win after exploiting mistakes by Bayern's Xabi Alonso and Dante.
"We always want to play from the back and this style can sometimes be dangerous, but mistakes are part of football," said Bayern captain Philipp Lahm.
"The 3-1 defeat hurts, but nevertheless there is still all to play for in the return leg."
Host coach Julen Lopetegui got one over his ex-Barcelona team-mate Pep Guardiola with Porto poised for a first semi-final appearance since 2004 when they won the Champions League under Jose Mourinho.
Lopetegui had said Porto needed to be the 'perfect protagonists' against Guardiola's Bayern and they got off to a dream start as right winger Ricardo Quaresma scored twice in the opening ten minutes.
Bayern pulled one back through Thiago Alcantara with 28 minutes gone.
But Porto captain Martinez, a surprise inclusion after six weeks out, added their third on 65 minutes for his 27th goal of the season.
The hosts rattled the German giants at Porto's Estadio do Dragao and had the five-time European champions immediately on the back foot.
In the opening exchanges, Martinez pressed Bayern midfielder Xabi Alonso into a rare mistake on the edge of the area and charged straight at Manuel Neuer.
The Germany goalkeeper brought the Porto skipper down trying to clear the danger and when Spanish referee Carlos Carballo pointed to the spot, Quaresma drilled home the third-minute penalty.
Porto doubled their lead when Dante took too long on the ball, Quaresma pressed him into a mistake and sprinted clear before some clinical finishing put the hosts 2-0 up after just ten minutes.
It was his fifth goal in three games for the 31-year-old Portugal veteran.
Bayern were without injured wingers Arjen Robben and Franck Ribery, plus midfielder Bastian Schweinsteiger, but still enjoyed 70 percent possession and made it count by scoring from their first real chance.
Centre-back Jerome Boateng put in a low cross from the right and Thiago stabbed home from close range to put the Bavarians back in the game.
It was the 23-year-old's first European game for more than a year after back-to-back knee injuries and the first Champions League goal of his career.
It finished 2-1 at the break, but only Neuer's reflex save tippped a shot by Mexico midfielder Hector Herrera over the bar to deny Porto a third goal with nearly an hour gone.
Their third came when Boateng mistimed his jump and Martinez accelerated onto the ball and went past Neuer to leave Bayern with it all to do if they want to reach a fourth consecutive Champions League semi-final.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ