Bayern came into Wednesday's clash at the Estadio do Dragao as favourites, but a trio of mistakes at the back leaves them with a huge task at the Allianz Arena next week.
In a dramatic start to proceedings, Ricardo Quaresma took full advantage of two glaring errors from Bayern in the opening 10 minutes, first converting from the penalty spot after Jackson Martinez had dispossessed Xabi Alonso and then been felled by Manuel Neuer inside the box.
Quaresma then robbed Dante and produced a calm finish to double his tally and leave visiting coach Pep Guardiola standing aghast on the touchline.
Bayern, missing the likes of Franck Ribery, Bastian Schweinsteiger and Arjen Robben, got themselves back into the tie shortly before the half-hour when Thiago Alcantara scored his first goal 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, leaving Bayern facing an uphill challenge in the second leg.