Bayern looked set for another shock result after the weekend defeat to Bochum when Salzburg's Junior Adamu scored in the 21st minute.
That was the first time Bayern had trailed in the Champions League this season, making it the final team in the competition to have done so.
It salvaged a draw in the 90th minute, though, when Kingsley Coman popped up at the back post to put Bayern in control ahead of the return leg in Munich next month.
The France international's goal saw Bayern extend the longest unbeaten streak away from home by a team in Champions League history to 22 games (W17 D5).
While Nagelsmann was unimpressed with his side's first-half display, he said its performance after the interval warranted at least a draw.
"We did better in the second half, just like in Bochum," he said. "In the first half we were too prone to making mistakes in the opposing half. We lost too many balls.
"The rest of our defence wasn't good, as was the goal we conceded, which is actually relatively easy to defend. A very avoidable goal. We weren't aggressive enough when pushing. It's a balancing act.
"The equaliser was deserved, we defended with more risk. I saw a lot of cramps in the Salzburg side. That's probably also an indication that we didn't do so badly in the second half."
The average age of Salzburg's starting XI was 23 years and 242 days – the youngest in the knockout stages of the Champions League for any team in almost 19 years, since Ajax in April 2003 against Milan (22 years and 205 days).
Bayern forward Thomas Muller was full of praise for Salzburg's young guns, but he believed the German giant deserved to leave Austria with a draw.
"It's mixed feelings," he said. "Salzburg are a good team and the atmosphere was great. Compliments to the crowd, that's how you imagine football.
"The general conditions were great, which is why it was fun even though we suffered a lot. In the second half we not only showed a reaction, but were also overwhelmingly superior.
"It was a good move how we came back. However, it was certainly not our desired result. Sometimes we still lack the courage to position ourselves. In attack, we have to blame ourselves for not making good use of the spaces that were there.
"We made wrong decisions there. Hats off that we still managed to draw 1-1. I think, to be honest, that was okay."