Kim went 3-for-4 with two doubles. Juan Soto reached base three times and scored twice for the Padres, who avoided a three-game sweep.
All-Star Manny Machado went 2-for-4, extending his streak of multiple-hit games to eight. The Miami native finished 6-for-11 for San Diego in the three-game series. The Padres' Josh Bell ended an 0-for-26 skid with a double in the ninth.
''We want to play better but I think today was more about getting in a good game and going home,'' said Padres manager Bob Melvin, whose club finished a 3-3 trip.
Cronenworth's two-out blast against Pablo Lopez (7-8) followed singles from Soto and Machado and a walk to Bell. It was Cronenworth's 12th homer this season and second career grand slam.
In the Padres' 4-3 loss Tuesday, Cronenworth went hitless twice late with runners in scoring position.
''It's hard to pick and choose when you do,'' Cronenworth said. ''You just want to have the best at-bat you can. They just happened to make some really good pitches on me (Tuesday). Got a pitch I could handle today and put a good swing on it.''
The Padres capped a five-run first on Kim's RBI double.
''It's good to see the offense come around, especially the first inning,'' Melvin said. ''They had good energy, good at-bats and put up a five spot. Certainly it was good feeling going through the rest of the game.''
The Marlins cut into the deficit and ended Padres starter Mike Clevinger's outing after 4 1/3 innings. Jon Berti hit a run-scoring double in the first and Jacob Stallings added an RBI single in the fourth.
Brandon Drury had an RBI groundout in the fifth for San Diego. Brian Anderson's run-scoring double in the bottom half got the Marlins within 6-3.
After Clevinger's exit, Adrian Morejon (2-0) threw 1 2/3 innings of scoreless relief. Morejon struck out Charles LeBlanc and pinch-hitter Jesus Aguilar with the bases loaded to end Miami's threat in the fifth.
Kim had a bases-clearing double against Miami reliever Elieser Hernadez in the ninth. Hernandez also surrendered a three-run double to Machado on Tuesday.
Clevinger allowed three runs on six hits and four walks.
''I didn't find it today,'' Clevinger said. ''I had good teammates behind me to pick me up. I had issues attacking the zone.''
Lopez lasted 4 2/3 innings, allowing six runs.
''As a starting pitcher, it's my job to set a good tone for the game and I set a very bad tone for this game, and I take responsibility for that,'' Lopez said.
WALKS PAY OFF
The Padres' RBIs in the first were preceded by walks. Bell worked a full count against Lopez before reaching. Trent Grisham also walked ahead of Kim's liner to the warning track in left that scored him from first.
''All those things end up maybe not being the sexiest thing in the box score but end up providing us better at-bats and more production after that,'' Melvin said.
Marlins: LHP Daniel Castano (concussion) continues to rehab but has not begun throwing yet.
Padres: Return home for a four-game series against Washington starting Thursday. RHP Yu Darvish (10-6, 3.40 ERA) is scheduled to start the opener for San Diego against RHP Anibal Sanchez (0-5, 7.20).
Marlins: LHP Jesus Luzardo (3-5, 3.72) will start the opener of a three-game series at the Los Angeles Dodgers and LHP Tyler Anderson (13-2, 2.81) on Friday.
More AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.