Spurs led 2-0 as Erik Lamela slid in to convert Georges-Kevin Nkoudou’s low cross at the back post and Christian Eriksen drilled in a second for Spurs.
But Bayern came back thanks to goals from teenagers Jann-Fiete Arp and Alphonso Davies, who levelled with a fantastic 25-yard curling effort.
Paulo Gazzaniga saved from David Alaba and Jerome Boateng in the shootout.
Spurs lost defender Juan Foyth in the second half to a serious-looking ankle injury and he left on a stretcher.
Spurs looked in control at 2-0 and Son Heung-min went close twice, forcing two good saves from Sven Ulreich, with the goalkeeper also denying Harry Kane, who had set up Eriksen’s second.
Hosts Bayern did threaten though, with Renato Sanches’ shot needing a save from Gazzaniga before goals from Arp, a summer signing from Hamburg, and Canada international Davies.
Spurs won the shootout 6-5 with Eriksen the only Tottenham player to miss his kick.
It was Tottenham’s second game against European giants in 24 hours, having beaten Real Madrid 1-0 on Tuesday in the semi-final of the Allianz Arena friendly tournament.
Nelson, 19, followed up a saved shot from Eddie Nketiah to level after Farid El Melali’s opener for the home side.
Substitute Pierre-Emerick Aubameyang had a late goal ruled out for offside.
And Emiliano Martinez saved the decisive penalty from ex-Gunner Jeff Reine-Adelaide to give Arsenal a 4-3 win in the shootout.
Henrikh Mkhitaryan could have won the shootout a penalty earlier for the visitors after Wilfried Kanga had fired his kick over the bar, but the Armenian followed suit with a poorly executed effort into the stand behind the goal.
It was another inconsistent display from Unai Emery’s side in a game designed as a celebration of Angers’ centenary.