Pepe stroked home the winner after 34 minutes to take unbeaten Juve, who have played one game less than most of their rivals, a point clear of Udinese and three ahead of Lazio.
"It was a hard-fought win that showed the character we have and how much we have matured," coach Antonio Conte told Sky Sports.
"There is much still to improve but we are moving in the right direction. We now have a difficult game at Napoli on Tuesday."
Napoli climbed to seventh after an Edinson Cavani strike deep into stoppage-time earned a 1-1 draw at Atalanta who had taken a 64th-minute lead thanks to German Denis's 10th league goal of the campaign.
Catania moved up to sixth with a 1-0 at Lecce while struggling Novara came back from a goal down to beat Parma 2-1 and record their second league win this season.
Juve, wearing pink jerseys, began brightly and should have been a goal to the good after 10 minutes when Claudio Marchisio headed over from close range following a brilliant run and cross from former Lazio right-back Stephan Lichtsteiner.
Six minutes later hosts Lazio had Federico Marchetti to thank for keeping the scores level after the goalkeeper changed direction at the last moment to palm away a viciously swerving Andrea Pirlo free-kick.
Lazio, with Tommaso Rocchi preferred to Djibril Cisse as Miroslav Klose's partner in attack, hit back after 21 minutes as Rocchi and Cristian Ledesma just missed the target.
With the game flowing from one end to the other it was Juve who made the breakthrough after a lightning counter-attack.
Seconds after Gianluigi Buffon saved from Rocchi, Mirko Vucinic released Alessandro Matri down the right and the Italian striker's perfect centre was slotted into the corner by the sliding Pepe.
Brazilian playmaker Hernanes wasted two good openings as Lazio attacked at the start of the second period before he smashed a left-footer against the upright on the hour with Buffon beaten.
Seconds later the Italy keeper flung himself to his left to turn aside a deflected Klose effort.
Juve weathered the storm and almost doubled the lead after 73 minutes when Marchetti reacted well to save from substitute Emanuele Giaccherini.
Matri then flashed a half-volley wide with eight minutes to go as the visitors eased to their seventh win in 11 league matches.
Lazio, who suffered their second defeat of the campaign, felt they should have had a first-half penalty.
"We showed we are at the same level as Juve but just couldn't take our chances," said coach Edy Reja.
"It was an even game, we had our chances and should have had a penalty in the first half with a clear handball on Rocchi's shot. They then scored immediately so it turned out to be a decisive moment."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.