Desmond's blast was ruled a homer after an umpire review and made a winner out of Doug Fister (7-2), who had five strikeouts and no walks in seven innings, giving up three runs on seven hits.
Jayson Werth hit a two-run homer for the Nationals, who extended their winning streak to a season-high five games and improved to 12-3 in their last 15 home games. Rafael Soriano pitched out of a jam in the ninth for his 20th save.
Michael McKenry hit a three-run homer for the Rockies, who have dropped 14 of their last 16, including six of seven on their road trip.
Rockies left hander Tyler Matzek struck out Bryce Harper to start the seventh inning and was relieved by Matt Belisle (2-4), who surrendered Desmond's home run on his second pitch.
No home run call was made on the blast to right-center field, and Desmond stood at third base while the umpires reviewed the play.
Replays appeared to show the ball hitting above the wall between the padding and the fence in front of the outfield spectators for a homer.
Matzek gave up three runs on six hits and a walk with six strikeouts and remains without a victory in his last four starts since winning his MLB debut on June 11.
In the ninth, Soriano walked McKenry with two outs and gave up a single to DJ LeMahieu to put runners on first and third before getting Josh Rutledge on a shallow fly ball to right field to end the game.
Earlier, McKenry followed singles by Troy Tulowitzki and Corey Dickerson with a homer into the visitors bullpen behind left field in the second inning to give the Rockies a 3-0 lead. It was his first homer since May 1 last season.
Werth belted his seventh homer of the season to left-center in the fourth inning to score Anthony Rendon, who singled. Harper hit a two-out double in the inning and scored on Desmond's single to tie the score.