SAN FRANCISCO — On May 4, 2024, Kendrick Lamar released the diss track “Not Like Us” to the shock of the music industry, the victory lap to his historic rap beef with Drake. The song became omnipresent, an inescapable instant classic. Matt Chapman made it his walk-up song shortly thereafter, and the record continues to blare throughout Oracle Park roughly four times per game.

On Saturday afternoon, there was nothing minor about Chapman’s game-saving swing.

Chapman blasted his third career grand slam — a 402-foot line drive with just enough lift to clear the center field fence — and flipped a one-run deficit into a three-run lead, rescuing the Giants from a potentially embarrassing loss to the last-place Rockies. Instead, San Francisco (21-13) escaped with a 6-3 win over Colorado (6-27) thanks to Chapman’s second homer in as many days — a sign that their cornerstone could be popping out of his slump.

“A lot of his home runs — a lot of his hits — have been impactful,” said manager Bob Melvin. “His defense is always impactful. We have quite a few guys we feel like we can get more out of offensively, but pretty timely hit today. Hopefully, that boosts his confidence at the plate.”

Chapman entered the Giants’ four-game set against the Rockies in search of days like Saturday.

While in San Diego, Chapman went 0-for-8 with six strikeouts against the Padres’ pitching and saw his batting average dip below .200 as San Francisco was swept. He’s far from the only hitter who’s underperforming, but with a solo home run on Friday and a grand slam Saturday, Chapman looks more like the impact bat the Giants’ offense desperately needs.

“The more you play, the more you understand that it’s a long season,” Chapman said. “If you continue to work on and do the right things over the course of the season, you’ll end up where you need to be and your numbers will look close to what you think they should be. ... For me, it’s just about staying within myself and taking good at-bats.”

As has been the case on 10 other occasions, Chapman and company had to climb themselves out of a deficit to emerge with a win.

Starter Jordan Hicks cruised through his first five innings, not allowing a hit until the fifth, but the right-hander’s day ended after he failed to retire the first three batters he faced in the sixth. Hicks walked Brenton Doyle to start the inning, putting the tying run on base. He followed up with two straight balls to Jordan Beck, necessitating a mound visit from Chapman and catcher Patrick Bailey.

Beck singled to put runners on first and second with no outs, prompting pitching coach J.P. Martinez to make his own mound visit — and give reliever Randy Rodríguez time to get warm. Soon enough, Melvin needed Rodríguez’s services. Ryan McMahon drove in Doyle with a single, tying the game up at one apiece, and Hicks’ afternoon was over.

Rodríguez inherited runners at the corners with no outs but he was unable to halt the rally. The right-hander allowed both runners to score on RBI singles from Hunter Goodman and Kyle Farmer, the latter of which deflected off Rodríguez’s foot, and the Giants found themselves trailing 3-1.

For all his early excellence, Hicks finished with a fine line score: five-plus innings, three earned runs, two walks, season-high seven strikeouts. Despite the bitter finish, Melvin said Hicks threw “probably as good as we’ve seen all year, really.”

With the possibility of a second loss to Colorado in this series looming, San Francisco’s offense found much-needed life in the bottom of the sixth.

Three of the Giants’ first four batters in the sixth drew walks — Luis Matos, Mike Yastrzemski and Willy Adames. Jung Hoo Lee cut the deficit to 3-2 by lining a sharp single to center to drive in Matos, whose solo homer in the third inning was San Francisco’s only run up to that point.

With the bases still full, the Rockies’ Jake Bird left a sinker right over the heart of the plate. Chapman sent it 402 feet into the Rockies’ bullpen, turning a one-run deficit into a three-run lead — a lead they’d never lose as Camilo Doval, Erik Miller and Ryan Walker combined to throw three scoreless innings.

“We’ve definitely had a lot of come from behind wins this year,” Chapman said. “I don’t think it’s something we want to make a habit of because it catches up to you sometimes. But it shows that no matter what the score is, this team keeps fighting. ... It just shows that our team has a lot of fight and we’re going to grind until the very end.”