The blast came in the eighth inning of the Mets' 6-5 victory Tuesday at Citi Field in Queens, N.Y. The Mets trailed 5-4 before Alonso's solo shot.
Juan Soto hit the first homer of the game, putting the Nationals up 1-0 in the top of the second inning. Jeff McNeil tied the score for the Mets on a fifth-inning RBI single. Brian Dozier grabbed the lead back for the Nationals with a two-run shot in the seventh inning.
But that lead didn't last long. J.D. Davis hit a three-run homer to right field in the bottom of the seventh frame, giving the Mets a 4-3 advantage. The Nationals answered once again with RBI doubles from Trea Turner and Soto in the eighth inning.
Matt Grace began the bottom of the inning by forcing Robinson Cano to ground out. The Nationals replaced the relief pitcher with Tanner Rainey to face Alonso in the next at-bat.
Alonso fouled off Rainey's first two offerings before taking a fastball for a ball. Rainey then fired in a 98.9-mph fastball. Alonso hammered the pitch to left field. The blast traveled 417 feet and had an exit velocity of 112 mph, according to Statcast.
Umpires reviewed the big-fly before determining it was a fair ball.
"I knew it was fair," Alonso told reporters. "I talked to it and was like 'stay fair, please.' And it listened."
Todd Frazier and Wilson Ramos struck out to end the inning. Edwin Diaz entered the game in the top of the ninth inning. The Mets reliever picked up his first win of the season by keeping the Nationals scoreless in the final frame. Amed Rosario hit a walk-off single off of Nationals reliever Kyle Barraclough with two outs in the bottom of the inning.
Alonso, 24, is hitting .260 with 16 home runs and 36 RBIs in 47 games during his rookie campaign. The Mets host the Nationals at 7:10 p.m. on Wednesday at Citi Field.