The Giants were the majors' hottest team for months, then had to beat the San Diego Padres 11-4 on Sunday for a franchise-record 107th victory to top the 1904 New York team and hold off pesky defending World Series champion Los Angeles at the end.
Webb (11-3) did it all in leading surprising San Francisco to its first division crown since 2012, delighting a delirious, deafening crowd of 36,901. Buster Posey had an incredible day, too.
The Dodgers won 106 games.
"You're going to be hard-pressed to see another race like this for quite a while," Posey said.
Posey raised both arms into the air when Eric Hosmer struck out swinging to end it, and ran out to the mound to hug reliever Dominic Leone.
"The first thing that comes to mind for me is how proud I am of this group and what they accomplished," Giants manager Gabe Kapler told fans from the field. "Part of the reason that I feel that way is because I think we all knew at the beginning of the season, or even dating back to the beginning of spring training, what the projections are and what the industry sort of thought of us as a club. What I realized is there are some intangibles that those projections and viewpoints failed to take into consideration."
Webb walked off to a roaring standing ovation when replaced in the eighth after allowing three straight singles. He struck out eight and didn't walk a batter while pitching seven-plus stellar innings, and also hit a two-run homer in the fifth to clear the fences for his first time in his career - a pretty line drive to left.
"That was way more important," Webb said, chuckling and sharing that he got the souvenir ball. "That was a special moment for sure. But we all knew the main thing was the pitching today."
Posey drove in three runs on a pair of singles and got his 1,500th career hit as San Francisco's division hopes came down to the final day. The Giants clinched the title in Game 162 after losing 3-2 in 10 innings a day earlier as Los Angeles won at night against NL Central champion Milwaukee.
"Well, it turned out that that was a very competitive 107 wins," Giants president of baseball operations Farhan Zaidi said. "We needed every one of them."
The Giants will host the winner of Wednesday night's wild-card game between the Dodgers and Cardinals in Game 1 of an NL Division Series on Friday at Oracle Park. Kapler hadn't picked a starter for the opener - saying he would weigh that decision Monday, ready for a tough choice between Webb and Kevin Gausman.
San Francisco wanted to earn it this way to dethrone the reigning champion Dodgers, who could have forced a Monday tiebreaker with a win and a Giants loss. The Dodgers had won the last eight NL West titles since San Francisco took the division nine years ago.
"It was our goal to win the West this year and we knew that could be a kind of lofty goal of where the projections were and where everybody thought we were going to end up," shortstop Brandon Crawford said.
San Francisco held baseball's best record for 125 days and won on the last day of the regular season for the first time since 2017. The Giants accomplished that Sunday without first baseman and home run leader Brandon Belt, sidelined by a broken left thumb.
No matter the constant injury challenges or other circumstances, "This group always thought we were going to win the game. Always," Kapler said.
Manny Machado briefly made things interesting with a sacrifice fly in the fourth against Webb, who went unbeaten since May 5 at Colorado. He finished 10-0 after that loss but was coming off three straight no-decisions since beating the Cubs at Wrigley Field on Sept. 12.
There were so many big hits to back the right-hander's latest gem. Mike Yastrzemski's two-run double in the seventh made it 11-1.
Webb walked to load the bases with one out in the fourth and Tommy La Stella followed with an RBI single before Wilmer Flores singled in two more runs.
This one brought on some Oct. 3 memories for the storied franchise, now determined to create more in October like the 2010, '12 and '14 World Series champions with some of the same faces of today in Posey, Crawford and Belt.
Webb delivered just as Jonathan Sanchez did pitching the Giants past the Padres on the final day in 2010 to advance the club to its first playoff appearance in six years. San Francisco went on to capture the club's first title since moving West in 1958.
Sanchez hit a key triple in the game - and Webb topped that with a mighty swing for his first homer since high school.
The reminiscing could even go way back to Bobby Thomson's Shot Heard 'Round the World as Willie Mays and the New York Giants beat Brooklyn 5-4 to clinch the 1951 pennant before eventually losing the World Series.
These 2021 Giants completed a stunning turnaround in Kapler's second year from a club that finished 29-31 for third place in the division during the coronavirus-shortened 2020 season.
Los Angeles and these Padres, after all, were the hands-down favorites to win the division when the season began six months ago.
Instead, this might have been Jayce Tingler's final game managing disappointing San Diego (79-83), which had high hopes of contending for a championship behind stars Machado and Fernando Tatis Jr. and a $175 million payroll. The Padres lost eight of their final nine and finished below .500 for the 10th time in 11 years - they were 37-23 last season - after losing 13 of their last 15 to cap a second-half collapse.
"We never imagined being in this situation. It's a little bit surprising, shocking, all those things," Tingler said. "There's a lot of reasons for it. ... It's miserable, it's horrible, it's all those things."
Padres starter Reiss Knehr (1-2) worked three innings in his 12th major league appearance and fifth career start.
Giants: Posey's durability down the stretch has been quite a physical feat. He started behind the plate for the fifth time in six games. While he pinch hit Saturday, Posey caught a full game Sunday for the 10th time over the final 13 games - remarkable at age 34 in his 12th major league season.
Longtime Giants coach Ron Wotus, who is retiring after 24 years, caught a ceremonial first pitch from his grand-nephew and was honored with a video tribute before the bottom of the fourth. He came out to coach third and tipped his cap as fans gave him a warm standing ovation.
Logan Webb dominates with 8 K's, HR as Giants take the NL West
Logan Webb puts on a stellar performance as he strikes out eight and hits a 2-run HR, leading the Giants to the win and the NL West title.