Washington's Juan Soto went 1 for 4 in what could be his final homestand with Tuesday's trade deadline looming. The Nationals were 0 for 9 with runners in scoring position.
Miles Mikolas (8-8) allowed two runs in seven innings for St. Louis, which won consecutive games for the first time since July 15-16.
Anibal Sanchez lost his third consecutive start for Washington, which has a majors-worst record of 34-67.
Sanchez (0-3) pitched into the sixth inning for the first time this season, and nearly escaped trailing just 3-1. Gorman hit a two-run homer to right on a full count to break the game open. The rookie has four home runs in his last 10 games and 11 on the season.
''He took some really good swings even prior to the homer, those backside line drives and staying on the ball,'' St. Louis manager Oliver Marmol said. ''That was really, really good to see.''
Nootbaar then went deep on a liner to right-center to end Sanchez's night. The home run came a pitch after Washington catcher Keibert Ruiz scampered to track down a pop foul, only to have it bounce out of his glove. He was not charged with an error on the play.
St. Louis took the lead with three runs in the third. Dylan Carlson and Paul Goldschmidt had run-scoring groundouts sandwiched around Sanchez's run-scoring wild pitch.
Sanchez allowed six runs in 5 2/3 innings in his first outing against St. Louis since taking a no-hitter into the eighth inning of Game 1 of the 2019 NLCS. He has a 7.47 ERA and has allowed five home runs in three starts since returning from the injured list.
''The problem is every time I make a mistake, I pay really hard for those moments and those pitches,'' Sanchez said.
Washington scored on sacrifice fly balls by Luis Garcia in the second and Josh Bell in the sixth. The Nationals failed to muster any other offense against Mikolas, who gave up six hits and a walk while striking out four.
Mikolas pitched at least seven innings for the third time in his last four outings. He was coming off allowing six runs in five innings Sunday at Cincinnati.
''I made some good pitches early and they got those singles through,'' Mikolas said. ''Not that I was thinking `Here we go again,' getting singled to death. It's a good bounce-back outing, just kind of reaffirming to me to make good pitches and play the odds. Teams aren't going to get that many hits like that in a row all the time.''
Cardinals: C Yadier Molina (right knee) was 0 for 3 with a hit by pitch and a stolen base as the designated hitter Thursday in the first game of his rehabilitation assignment with Triple-A Memphis. Molina is expected to catch Saturday and Sunday. . RHP Drew VerHagen (right hip) threw a side session Friday. . RHP Jack Flaherty (shoulder) threw a side session Thursday in the Los Angeles area. Marmol said he could join the team in St. Louis next week. . OF Harrison Bader (right foot) will wear a protective boot for the next two weeks.
Nationals: RHP Reed Garrett (biceps inflammation) pitched a scoreless inning Friday in his first rehab appearance for Triple-A Rochester.
OF Elijah Green, the No. 5 overall pick in this year's draft, took batting practice with Washington. Green signed July 22 and will report to the Nationals' Florida Complex League affiliate Monday.
St. Louis removed 3B Nolan Arenado, C Austin Romine and Goldschmidt from the restricted list and optioned OF Conner Capel and C Ivan Herrera to Memphis and outrighted INF Cory Spangenberg to Memphis.
Cardinals: RHP Dakota Hudson (6-6, 4.10 ERA), who is 2-1 with a 2.93 ERA in six lifetime appearances against Washington, will come off the injured list to start Saturday.
Nationals: RHP Erick Fedde (5-7, 4.95), who is 0-2 with a 7.11 ERA, 11 strikeouts and 13 walks in four July starts, draws the start as the series continues.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.