Bayern Munich survived a late fightback from Celtic to secure a 2-1 win in the first leg of their Champions League play-off tie on Wednesday.