Kieboom finished with two hits for the Nationals, who are 5-3 on their nine-game road trip.
Davis Schneider hit a solo home run and an RBI double for the Blue Jays. who are 2-3 on a six-game homestand.
The teams have split the first two games of a three-game series.
Washington left-hander MacKenzie Gore (7-10) gave up one run, six hits and two walks with two strikeouts and exited with a 5-1 lead after five innings. Three Nationals relievers followed with rocky outings, with Kyle Finnegan earning his 25th save despite yielding a run in the ninth.
Toronto right-hander Jose Berrios (9-10) allowed five runs, six hits and two walks in six innings. He struck out two.
Washington took a 2-0 lead in the second. Dominic Smith singled with one out, and Kieboom hit his third homer of the season, a 410-foot drive to left-center.
Schneider led off the home third with his sixth home run in 13 career major league games, a blast to left.
Washington took a 5-1 lead in the fifth. Lane Thomas walked with two outs, Joey Meneses singled and Ruiz hit his 16th home run of the season on a drive to right.
Washington's Jacob Young led off the seventh with a bunt single against Bowden Francis for his first career major league hit in his fourth game.
Nationals reliever Mason Thompson, after tossing a perfect sixth, allowed a leadoff walk to pinch hitter Cavan Biggio in the seventh. Biggio stole second and scored on Schneider's two-out double.
Danny Jansen led off the Toronto eighth with a single against Hunter Harvey. Jansen was forced out at second on a grounder by Whit Merrifield, who took third on Alejandro Kirk's double. A wild pitch scored a run before Kirk was thrown out by Young trying to score on pinch hitter Daulton Varsho's fly ball to center.
Finnegan allowed singles to Biggio and Kevin Kiermaier and a walk to George Springer to open the bottom of the ninth. After Schneider fanned, a run scored on Vladimir Guerrero Jr.'s groundout. Jansen fouled out to end the game.
Guerrero singled in the first inning to extend his hit streak to 10 games.
Toronto put shortstop Bo Bichette (strained right quadriceps) on the injured list Tuesday and selected the contract of infielder Mason McCoy from Triple-A Buffalo.
—Field Level Media