CHICAGO - Joe Maddon had a feeling the game might end up like this.
The victory gave the Cubs a 1-0 lead in the National League Division Series.
"Runs were hard to manufacture because both pitchers were doing so well, there wasn't enough baserunners, there wasn't a whole lot of hard contact," said Maddon, the Cubs manager. "I wasn't thinking that, but more than likely a game like that would end with a home run."
"I felt good, but we kept giving up base hits," said Lester, who picked up the win after allowing five hits and striking out five batters in an efficient 86-pitch outing. "I think the first three innings we had leadoff hits. ... But as the game got on, we started making better pitches and figuring out what guys were trying to do."
Lester retired 13 straight between the fourth and eighth innings.
Aroldis Chapman entered in the ninth and gave up one hit to secure the win and a save.
"I thought (Lester) was real calm in his demeanor tonight. I thought he looked very comfortable out there," Maddon said. "Cueto was also very good."
Cueto kept the Cubs off base until the fourth inning, struck out a career postseason-high 10 batters and allowed just three hits.
"We both were pitching a great ballgame and were obviously were aware that one run was going to decide the game," Cueto said.
The eighth-inning homer by Baez came on a 3-2 pitch and landed in the left field basket.
"Obviously, I was trying to get on base," Baez said. "I was thinking about bunting and the third baseman was playing in. Cueto was pitching me inside all night, (I was) just waiting for him to make a mistake and he finally did."
Cueto, who took the loss, otherwise had a crisp three-hitter but topped 100 pitches by the eighth inning and closed with 118. He struck out 10 while walking none.
"Both (Cueto and Lester) were outstanding," Giants manager Bruce Bochy said. "We saw a game where it was hard to pitch better than those two guys. Johnny threw a beautiful game and the guy (Baez) got enough of it to leave the ballpark."
The low-scoring outcome was the sixth straight one-run game between the teams, including four at Wrigley Field in early September.
The Giants threatened with two outs in the fourth when Angel Pagan lined a 3-1 pitch to left for what appeared to be the final out. Instead, the ball slipped past the outstretched glove of Ben Zobrist for a hit that also advanced Posey to third. Lester escaped the inning as Brandon Crawford grounded to short.
Cubs catcher David Ross thwarted potential Giants threats with two pickoffs in the early going on a night featuring several defensive gems.
Ross threw out Gorkys Hernandez at second in the opening inning and then caught Conor Gillaspie leading too far off first base in the third.
Ross lined a long fly to left center in the Cubs' third that would have gone for extra bases except for a sliding catch by Hernandez on the warning track.
NOTES: Giants manager Bruce Bochy has named RHP Jeff Samardzija (12-11, 3.81 ERA) as Saturday's Game 2 starter. LHP Madison Bumgarner (15-9, 2.74) goes against Cubs RHP Jake Arrieta (18-8, 3.10) in Game 3 on Monday at AT&T Park. ... Samardzija had a rough outing in his only appearance at Wrigley Field on Sept. 1, allowing three runs in four innings. ... Since 2010, the Giants have reached the postseason four times with World Series titles in 2010, 2012 and 2014. ... Chicago's final NLDS 25-man roster announced Friday left off RHP Jason Hammel, a 15-game winner during the regular season who suffered right elbow tightness and missed his final start. ... The Cubs are making back-to-back postseason appearances for only the second time since 1909 and the first since 2007-08. ... RHP Kyle Hendricks carries a 2.13 ERA, the major league's lowest, into Saturday night's game against the Giants.