The defender fired home from an early corner before the young Frenchman jumped off the bench to score a brilliant strike which put the game out of the host's reach
Having seen Napoli triumph on Saturday, Juve responded a day later with a 17th victory in their last 18 league matches as Massimiliano Allegri's men hunt their fifth successive title.
Barzagli gave Juv the lead after 23 minutes, turning home a Mario Mandzukic header for his first Serie A goal since May 2012, which also came against Atalanta.
Lemina came off the bench to secure the victory with five minutes to go and another loss extends Atalanta's winless streak to 13 league matches as they slip further towards the relegation zone.
An eighth successive clean sheet for Juve means Gianluigi Buffon is now on the third longest Serie A run without conceding a goal, behind only Sebastiano Rossi (929 minutes) and Dino Zoff (903 minutes).
Claudio Marchisio returned from a thigh injury for Juve, but Giorgio Chiellini's calf problem kept the defender out, while Atalanta were without Alejandro Gomez (hamstring) and Mauricio Pinilla (calf).
The hosts started brightly, but the first chance went to Juve after 10 minutes when a quick break freed Sami Khedira to shoot inside the box, Marco Sportiello saving well at his near post.
Luca Cigarini then miscued a volley straight at Buffon as Atalanta continued to threaten.
Paul Pogba curled a long-range strike just over the crossbar after 20 minutes, but the champions scored from their next attack.
Atalanta failed to deal with a simple cross into the box and Barzagli, played onside by the unwitting Marten de Roon, swept in a close-range finish after Mandzukic flicked the ball on.
With Juve looking typically solid at the back, Buffon set a record for the longest period without conceding a goal since three points for a win were introduced in Serie A 22 years ago, the veteran having not been breached in 775 minutes.
Seeking to end that run, Atalanta broke at pace after Marchisio was caught on the ball six minutes before half-time, but De Roon's volley was comfortably saved by Buffon.
A moment of madness by Sportiello almost handed Juve a second goal after 58 minutes, but Mandzukic could not capitalise on the goalkeeper losing possession when attempting an ill-advised dribble.
Mandzukic could have sealed a 12th straight win for Juve Against Atalanta after 68 minutes, his free header flying over the crossbar.
With seven minutes to go Rafael Tolio was inches away from turning in an equaliser at the back post, but he could not stretch to get a decisive touch.
Substitute Lemina then secured the points, riding two tackles before smashing a low strike into the bottom corner to seal another win for Allegri's side.