It looked like Bayern could be on the end of an embarrassing scoreline as the hosts' slick passing was cutting through at will.
But the Germans clawed a goal back on 28 minutes when Boateng's low cross from the right escaped both Danilo and Bruno Martins Indi to reach Alcantara, who slotted home coolly past Porto keeper Fabiano.
As the excitement rose in the second half, Porto managed to maintain their impressive energy levels and took the game to Bayern once again.