Goals from Thomas Muller and Arjen Robben either side of half-time looked to have put Bayern in control of the tie.
But Paulo Dybala pulled one back and substitute Stefano Sturaro equalised to ensure Juventus will go into March 16’s second leg with optimism.
Mario Mandzukic scuffed an early shot for Juve before, at the other end, a 25-yard volley from Arturo Vidal was beaten away by Gianluigi Buffon.
Bayern missed an extraordinary opportunity in the 13th minute when Philipp Lahm, making his 100th Champions League appearance, cut the ball into the box and Robert Lewandowski drew the keeper but squared the ball behind Muller, who could not get the ball out of his feet and his weak shot was cleared off the line by Leonardo Bonucci.
Bayern continued to dominate and it told before half-time as Costa’s volleyed cross deflected off Andrea Barzagli and Muller stroked home.
Juve coach Massimiliano Allegri sent on Hernanes for Claudio Marchisio at half-time but the desired impact was not forthcoming as Robben made it 2-0 10 minutes into the second period.
Thiago Alcantara’s pass sparked a three-man breakaway and Lewandowski, who got away with a foul on Bonucci in the build-up, used Muller as a decoy and fed the Holland winger, who cut inside and curled a left-foot shot around Bonucci and Buffon.
The Bayern pressure kept coming and Lewandowski sent a diving header wide.
Out of nowhere, though, Juve pulled a goal back when Kimmich’s error presented the ball to Mandzukic and he slid it through for Dybala to take a touch and finish.
Mandzukic was fortunate to escape punishment after twice pushing his head towards Lewandowski as the two squared up but it did not disrupt Juve’s new-found rhythm.
Allegri sent on Sturaro in the 69th minute and Alvaro Morata in the 75th and these changes paid off immediately, as Morata headed Mandzukic’s pass across the six-yard box for a lunging Sturaro to finish via the crossbar.
Barzagli cleared Robben’s cross away from Lewandowski and when Muller delivered from the other side, it was just too far in front of the Poland striker.
Bonucci’s shot was straight at Neuer and Bayern substitute Franck Ribery, who on Sunday returned from 11 months out, was unable to pick out Lewandowski as the match finished with no further score.
Buffon, Lichtsteiner, Barzagli, Bonucci, Evra, Cuadrado, Khedira (Sturaro 69), Marchisio (Hernanes 46), Pogba, Mandzukic, Dybala (Morata 75).
Neuer, Lahm, Kimmich, Alaba, Bernat (Benatia 74), Robben, Muller, Vidal, Thiago, Douglas Costa (Ribery 84), Lewandowski.
Martin Atkinson (England).