The Nationals rallied to score seven runs over a three-inning stretch for a 7-6 lead after seven. Daniel Nava tied it with a solo homer in the eighth, and Repko's one-out double down the right-field line off Henry Rodriguez (1-1) put Boston ahead for good.
"[He's] had a heck of a spring, doing all those things that help you win games," Red Sox manager Bobby Valentine said of Repko. "He's absolutely been in the mix from the beginning. Today, he gets a big hit in a game ... and makes a perfect throw. He's only done everything we've asked him to do."
Repko did one more big thing in the bottom of the ninth. Chorye Spoone, who's hometown is about 30 minutes away in suburban Maryland, came on to pitch in the bottom of the ninth and retired the first two batters he face before Desmond walked and stole second. Danny Espinosa singled up the middle, but Repko nailed him at home with a perfect throw to catcher Daniel Butler, who blocked the plate and made a good tag.
Nationals manager Davey Johnson wasn't too upset afterwards. After all, it was an exhibition game, and they're looking ahead to the regular-season opener Thursday in Chicago.
"Well, I mean, it was a great ballgame," Johnson said. "By and large, it was a fun spring for me."
Boston starter Clay Buchholz didn't make things fun for Washington early on, as he retired the first 12 he faced. He gave up a three-run homer to Wilson Ramos in the fifth plus a solo shot to Desmond in the sixth to spark the Nationals' comeback from the early 6-0 hole.
Buchholz gave up four runs on four hits in 5 2/3 innings. He struck out five, didn't walk anyone and appeared in command throughout.
"[That's] the best I've felt all spring," Buchholz said. "I felt my tempo, which I've been trying to work on, was a lot better. A lot of strikes and no walks."
Washington did better after Buchholz left, and the Nationals kept rolling with a three-run seventh. Ramos hit an RBI single off Boston reliever Justin Thomas to make it 6-5. Michael Bowden came on in relief and later walked Espinosa to force in the tying run.
Steve Lombardozzi -- another Maryland native from about 30 minutes away -- then followed with a sacrifice fly to left, and Ramos slid in just ahead of the throw to give Washington its first lead of the day at 7-6.
But the Nationals couldn't hold it. Boston's clutch hitting helped the Red Sox rally, Alfredo Aceves (1-0) threw a scoreless eighth, and Spoone got his first save with his work in the ninth.
Up next: Stephen Strasburg will make his first Opening Day start Thursday, when the Nationals travel to Chicago to face the Cubs at 2:20 p.m. ET.