Washington manager Matt Williams told LaRoche to get ready to pitch the bottom of the 16th had the game remained tied.
"I'd rather not see that and go home any day of the week, but I'm sure Rochey is mad at me for hitting the home run," Zimmerman said. "I guess I'll have to see it maybe another time."
Zimmerman hit a 2-0 pitch off Mike Fiers (0-1) over the wall in left field for the Nationals fourth consecutive victory.
"I've had a rough past two weeks or so, but I kept grinding it out," said Zimmerman, who was in an 8-for-53 slump coming into the game. "I got myself into a good count and put a good swing on the pitch."
LaRoche last pitched in a minor-league game in 2003 and would have had a tough time matching the team's bullpen, which threw 10 scoreless innings against the Brewers. Tyler Clippard (5-2) pitched the 15th for the victory.
Rafael Soriano capped the bullpen's excellent work by pitching the 16th for his 18th save.
"It's not the ideal situation, we've been pretty taxed down there," Clippard said. "But you know what? We wanted this win and we stepped up tonight."
With one out in the 16th, LaRoche hit a sharp single that bounced off the wall in right field on one hop. Zimmerman then hit his third home run of the year to give the Nationals the lead in a game that took 5 hours, 22 minutes.
"We'd been scratching and clawing and trying to get a run across," Williams said. "We had some opportunities but that is a big swing for us right there."
The Brewers threatened in the 13th, 14th and 15th innings.
"We had some chances today and we just had some bad at-bats," Milwaukee manager Ron Roenicke said.
In the 14th, Denard Span kept the Nationals alive with a leaping catch at the wall to rob Elian Herrera of an extra-base hit that likely would have scored Khris Davis from first and won the game for Milwaukee.
Gomez popped out to end the 15th with Scooter Gennett on second.
Williams intentionally walked Jonathan Lucroy in both the 13th and 15th innings to face Gomez, and the move worked both times to end threats.
"He's one of the best hitters in the league," Williams said of Lucroy. "It's an opportunity to potentially get around him. We had to pick our poison there."
Washington had a chance to score in the 14th, putting runners on first and second with one out. Fiers got Danny Espinosa, who is 5 for 57 with runners in scoring position, to fly out and Jose Lobaton grounded out to end the inning.
That's when the bullpens took over. Neither team could get a runner in scoring position after Rendon's homer until the Brewers fruitless rally in the 13th.
The Brewers, who came into the series second in the NL in runs, lost 3-0 on Monday night.
Milwaukee starter Yovani Gallardo allowed one run, four hits and two walks with five strikeouts, leaving after throwing 104 pitches in six innings. In his last four starts, he is 2-0 with a 1.00 ERA.
Washington starter Jordan Zimmermann pitched six innings, allowing two runs, six hits and two walks while striking out nine. In his past three starts, he is 0-2 with a no-decision despite having a 2.14 ERA in those games.
Nats OF Bryce Harper (left thumb) went 2 for 3 with a home run and four RBIs in his second rehab start for Potomac against Salem. He fielded one ground ball single while playing center field. C Wilson Ramos (wrist) also played in the game and went 2 for 5 with two RBI. ... A foul tip from Gomez became lodged in the grill of Lobaton's mask in the second inning. Home plate umpire Andy Fletcher had to pull it from the mask. Gomez struck out on the next pitch.