Headley's homer, his 15th, came in the first inning. Alonso hit his sixth homer in the third to give San Diego a 5-0 lead.
"We were trying to be as aggressive as possible," Alonso said. "It was the game plan with the guy pitching because we knew he was a strike thrower."
"When you homer three times and you have guys on base, it gives you a pretty good opportunity," Padres manager Bud Black said.
Harvey (1-2), who set a Mets record when he struck out 11 in his debut on July 26, struggled in his third start. He allowed five runs and eight hits, including seven for extra bases. He walked one and struck out five.
"It was one of those days where I couldn't find the strike zone and when I did, it wasn't quality," Harvey said. "I wasn't executing like the last two starts."
Harvey made his major-league debut with a 3-1 win at Arizona when he allowed one run in 5 1/3 innings. He lost his other start 4-1 at San Francisco on Tuesday despite allowing two earned runs in six innings.
"Obviously, the command of the fastball was the big difference," Mets manager Terry Collins said. "I just thought one of the things he was effective with the last two times was locating his fastball down in the zone. (Sunday) he was more in middle of the zone."
Marquis rebounded from one of his worst outings of the season by holding the Mets to three runs and four hits in 6 1/3 innings. He had five strikeouts and one walk.
The Padres needed Marquis to go deep in the game after Saturday night's 6-2 loss when starter Edinson Volquez was knocked out in the second inning. San Diego used five relievers to pitch the final 7 1/3 innings.
"I tried to attack the zone and get quick outs," Marquis said. "I tried to execute my game plan and tried not to change too much."
In his previous start, Marquis allowed seven runs and a season high-tying three homers in 6 1/3 innings of Tuesday's 7-6 loss at Cincinnati.
"He was efficient and pretty sharp early," Black said. "He gave us exactly what we needed, a gutty effort. He knew what he needed to do and he delivered."
Huston Street, the last of three relievers, got the final three outs to complete the five-hitter.
The Padres won for just the third time in nine games and tied a season high with nine extra-base hits.
"We felt like (Saturday) we weren't aggressive, we were too passive," Alonso said. "(Sunday) we were able to be a little more aggressive."
New York completed its season-high 11-game West Coast road trip with a 6-5 record.
Ronny Cedeno hit a pinch-hit, two-run homer in the sixth one out after Baxter's walk. It was the Mets' eighth pinch-hit home run.
Tejada's hit to lead off the game extended his career-high hitting streak to 11 games.
Ten of Alonso's past 16 hits have gone for extra bases. ... Cedeno's pinch-hit homer was the second of his career. The other came with the Chicago Cubs on Aug. 6, 2007, at Milwaukee. ... Mets LHP Johan Santana pitched three scoreless innings in a rehab start for Class A Brooklyn on Sunday. Santana allowed one hit with one walk and three strikeouts against Auburn. Santana was placed on the DL on July 21 with a right ankle sprain. ... Highly touted Mets prospect right-handed pitcher Zack Wheeler will have to wait to make his debut with Triple-A Buffalo. Wheeler's scheduled start on Sunday night was rained out. He will start the first game of Monday's doubleheader. Wheeler, acquired from San Francisco last summer for outfielder Carlos Beltran and cash, was 10-6 with a 3.26 ERA in 19 starts for Double-A Binghamton. ... Cubs LHP Travis Wood (4-7, 4.90) will face Padres LHP Eric Stults (1-2, 3.19 ERA) on Monday night in the opener of a three-game series. ... The Mets are off Monday before hosting Miami on Tuesday.
Tatis smiles upon hearing his name attached to LeBron and Mahomes
Fernando Tatis Jr. smiles when he is compared to LeBron James and Patrick Mahomes.
Trout talks with MLBPA chief Clark daily with current CBA expiring soon
Mike Trout says he chats with MLBPA executive director Tony Clark often as the union seeks out advice about CBA negotiations.
Shin-Soo Choo to play for South Korean club on 1-year, $2.4M contract
Shin-Soo Choo will play for a basebal club in his native South Korea after agreeing to a one-year contract worth 2.4 million, the biggest of its kind in the KBO league.
Ohtani: Velocity topped out at 97mph
Shohei Ohtani reacts to throwing live batting practice for the Angels and says his velocity topped out at 97mph.
Fresh off Cy Young season, Shane Bieber would 'love to dive into' contract talks with Cleveland Indians
As the optimistic Indians ponder contract talks with ace and Cy Young Award winner Shane Bieber, team president Chris Antonetti said Cleveland is "hopeful that Shane will be here for a really long time to come."
Throwing live batting practice, an optimistic Shohei Ohtani tops out at 97 mph for Los Angeles Angels
Saying that the "rules are -- there aren't going to be any rules" with Shohei Ohtani's usage this season, Angels manager Joe Maddon is optimistic about the veteran's prospects on the mound.