Grandal hit a bases-clearing triple and Alonso drove in two runs.
"Good for those guys, probably took a little weight off of their shoulders coming back to Miami," Padres manager Bud Black said. "I'm sure they left a lot of tickets and to get a couple big hits, a couple RBIs, and have us win made a lot of people here happy."
Grandal estimated he had over 150 friends and family in attendance. Alonso had a suite full of 30 supporters.
"Tomorrow there will be more, so hopefully I'll get more cheers than Yasmani did," Alonso said.
Padres starter Kip Wells (2-3) allowed two runs in six innings.
Carlos Zambrano (5-9) allowed five runs -- four earned -- and three hits in five innings as the slumping Marlins lost for the eighth time in nine games.
"They only scored in two innings and that was enough," Marlins manager Ozzie Guillen said. "Those two innings are what killed us. It's not as if they came out and scored every inning. I wonder what happened to Carlos tonight. It was too quick."
Wells pitched out of a bases-loaded jam in the fifth, getting Lee to ground out to end the inning.
"The momentum swung back to us there," Black said. "You could tell that the Marlins were a little bit dejected after that."
San Diego responded in the top of the sixth by scoring five runs to turn the game around.
Zambrano had allowed just one hit in the first five innings, but Logan Forsythe led off the sixth with a double, and Jesus Guzman reached on an error by second baseman Emilio Bonifacio. Then, Zambrano issued back-to-back walks, including Carlos Quentin with the bases loaded.
"I've been in this game a long time, nothing upsets me more than a walk," Zambrano said.
Grandal followed and smacked a triple -- his first of the season -- over the head of center fielder Justin Ruggiano to make it 4-2 and chase Zambrano.
"It looked like it was going straight, (Ruggiano) had a good jump on it, but either way I was going to tie the game so I was happy with it," Grandal said. "As soon as I looked up the ball kind of started fading away from him. The line he was going, obviously he wasn't going to catch it so immediately my first thought was three."
Alonso followed with an RBI single off Chad Gaudin to break an 0-for-21 slump.
"Just one at-bat away from breaking it, one pitch away, one swing away," Alonso said.
The Padres sent 11 batters to the plate in the inning and scored five runs on four hits and three walks.
Alonso added another RBI single in the seventh before Cameron Maybin's RBI double gave the Padres a 7-2 lead.
Responding to recent trades made by the Marlins, Miami manager Ozzie Guillen said: "I don't know if people really know (owner Jeffrey) Loria (and the front office), but they're cocky, arrogant, and want to win. The manager is cocky and arrogant, he wants to win. I know they're going to put something together here, I know. We have to do the right thing, make the right moves, think about what we're going to do and build those guys up to have a winning attitude. We're doing that right now." ... Bonifacio was caught stealing for just the third time in 29 chances when Grandal threw him out trying to steal second in the first inning. ... Alonso and Grandal played one season together at Miami in 2008 and advanced to the College World Series. ... Padres LHP Joe Thatcher was unavailable due to a sore left knee. He is day to day. ... RHP Nate Eovaldi (1-6, 4.15 ERA) will make his Marlins debut on Saturday after being traded from the Los Angeles Dodgers in the Hanley Ramirez deal. Eovaldi will face Padres RHP Ross Ohlendorf (3-0, 5.16 ERA).