Alonso hit his 27th home run in the fourth, breaking the Mets record for most by a rookie in an entire season set by Darryl Strawberry in 1983.
With the Mets clinging to a one-run lead, Baez launched his 19th homer of the season with Kyle Schwarber and Anthony Rizzo on base and one out. Baez sent an 0-2 pitch from Seth Lugo (3-1) halfway up the right field bleachers.
"He just kind of hanged it out a bit and I got the barrel on it," Baez said. "I think when I get to two strikes, I try to see the ball better and cut down my swing, which is pretty hard for me because I gotta swing hard."
Baez learned that it was his 100th homer after returning to the dugout and being mobbed my teammates.
"It's really exciting," Baez said. "I thought it was going to be a little bit later on in my career."
Mets starter Jacob deGrom allowed two runs and eight hits in six innings. The NL Cy Young Award winner struck out nine and walked none.
DeGrom also drove in a run with a single.
Alonso's solo shot to center came on a soft 0-2 pitch from Hamels in the fourth that Hamels said resulted from a "mixup" with catcher Victor Caratini. The 24-year-old had homered on Saturday to set a new mark for NL rookies before the All-Star break.
"Thankfully I saw two of them in the previous at-bat and saw it long enough and put a really good swing on it," Alonso said. "I'm proud of it, but I wish we won today. It was a tough loss."
Alonso connected in his 77th game while Strawberry hit 26 in 133 games in 1983. The Mets' record for homers in a season is 41, shared by Carlos Beltran and Todd Hundley.
Baez said he talked to Alonso during the series and tipped his cap to the rookie.
"He doing something amazing," Baez said. "He's almost got 30 homers and we've still got two more weeks until the All-Star break. I like the way he's playing the game and the way he's hitting the ball."
Strawberry also took note.
"Congrats to Pete for breaking my record which has stood for a long time," Strawberry said in a statement. "What he's done in a short period of time is most impressive. No goal seems out of reach."
Alonso is nearing Mark McGwire's major league record for homers by a rookie before the All-Star break, 33 set in 1987.
Tomas Nido also homered for the Mets.
Hamels helped his cause with an RBI single and Rizzo drove in Chicago's other run as the Cubs salvaged a split in the four-game series.
Hamels yielded three runs on seven hits through seven innings.
NEW YORK STATE OF MIND
Mets manager Mickey Callaway cursed at Newsday reporter Tim Healey, and pitcher Jason Vargas had to be restrained from charging him during a confrontation in the team's clubhouse after the game.
Reporters asked repeatedly after the game about Callaway's decision to stick with Lugo instead of going to closer Edwin Diaz. After the press conference, Callaway walked past Healey in the clubhouse. Healey told Callaway he would "see you tomorrow," and Callaway responded by calling Healey an obscenity. Callaway walked away and then returned, cursing at Healey again and telling him to leave the clubhouse.
Vargas then stared down Healey and eventually tried to charge him. Players stepped in to restrain the veteran left-hander.
No punches were thrown, and Healey left the clubhouse moments later.
RHP Craig Kimbrel is expected to pitch at least one more time for Triple-A Iowa, probably Tuesday, before the Cubs consider recalling the closer, manager Joe Maddon said.
After tossing a scoreless inning Friday, Kimbrel threw again Saturday as an opener for Iowa in a rain-shortened contest. The right-hander allowed a run and got two outs as he pitched in back-to-back games for the first time since finalizing a three-year, $43 million deal with the Cubs on June 7.
Mets: Callaway said before the game he had no timeline on next steps for RHP Noah Syndergaard (right hamstring), who threw a bullpen on Saturday. "We'll talk to the player and see exactly what we want to do next," Callaway said. Syndergaard is eligible to come of the 10-day IL on Wednesday.
Cubs: Chicago activated RHP Tony Barnette (right shoulder inflammation) off the 60-day injured list and optioned RHP Rowan Wick to Triple-A Iowa. Barnette, 35, started the season on the IL. He went 2-0 with a 2.39 ERA in 22 relief appearances for Texas in 2018 before a shoulder strain ended his season in early July.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Austin Riley walks it off for the Braves in Game 1 of the NLCS
Austin Riley drives home Ozzie Albies in the bottom of the ninth to give the Braves a win over the Dodgers.
Tony Gonsolin breaks out unique cat-themed cleats
Dodgers pitcher Tony Gonsolin displays his love for cats with some feline-friendly footwear.
Austin Riley lasers game-tying dinger down the left-field line
The Braves and Dodgers are knotted at two runs apiece after Austin Riley ropes a solo shot to left.
Will Smith crushes long homer for the Dodgers
Will Smith launches his third home run of the postseason to put the Dodgers ahead in the fourth inning.
2021 MLB playoffs: Schedules, postseason bracket, analysis and updates
All the latest information about the teams, storylines and highlights of the 2021 MLB postseason, from the start of October through the World Series.
2021 MLB playoffs: Best moments from Saturday's league championship series action
Saturday's league championship series action is the latest display of October magic.