Jose Bautista also homered for the second day in a row as Toronto defeated the Boston Red Sox 5-2.
Toronto (67-66) scored four runs — including two unearned — in the seventh inning with Valencia recording his first homer as a Jay. That made a winner out of Stroman, who was on cruise control other than hitting a two-run bump in the sixth inning.
"He was terrific today," Toronto manager John Gibbons said of the 23-year-old right-hander. "We've seen him like that a few times this year so it's not like all of a sudden that came out of nowhere. But he had been in a little bit of a rut.
"But that's what the kid's capable of."
The Jays, who had gone 1-3 during a run of four straight extra-inning games, can now look forward to an off-day before hosting Derek Jeter and the New York Yankees on Friday.
Stroman (8-5) left to an ovation from the Rogers Centre crowd of 30,285 with two outs in the eighth. He gave up one unearned run on five hits, striking out six and walking one. Stroman threw 112 pitches, 73 for strikes.
"He was sticking that fastball," said Gibbons. "It was down at the knees most of the night which is different (from) when he struggles. And he had that nice little breaking ball."
Left-hander Brett Cecil retired David Ortiz to end the eighth inning and struck out the side in the ninth for his fifth save.
The win was just Toronto's seventh in 23 games in August. The Jays had lost 10 of their last 13 games and 12 of 17.
Boston (58-75) came into the game having won two in a row since snapping an eight-game losing streak.
Stroman has struggled of late, losing his last three decisions. But he was razor-sharp Wednesday, retiring the first eight batters he faced before issuing a walk. He retired 10 of 11 before giving up a walk to Ortiz with one out in the fourth inning with the damage quickly erased by a double play.
He allowed just one hit and faced 16 batters in the first five innings, just one over the minimum.
Contrast that to his last outing, when he gave up 10 hits and six runs in five innings against Tampa Bay. prior to that he failed to survive the first inning against the White Sox, yielding five runs on five hits.
Like Gibbons, Stroman pointed to keeping his fastball down as a key for the turnaround.
"It's just baseball," he added. "Sometimes you just go through a rough stretch."
Confidence is not an issue for Stroman, whose baseball cap — jauntily worn backwards during a post-game interview — read FAME on the front.
Stroman has won all three starts against Boston, posting an 0.83 earned-run average with five walks and 21 strikeouts.
Stroman's strong showing was timely given that Toronto had used 10 pitchers and a position player on the mound the last two games.
Things went slightly south in the sixth, however, with the Jays leading 1-0. Third baseman Juan Francisco's throwing error put David Ross on with one out and Ortiz singled him home after back-to-back singles by Brock Holt and Dustin Pedroia loaded the bases. Holt then scored from third on a wild pitch to make it 2-1.
Stroman limited the damage, dispatching the next two batters to strand Red Sox runners on second and third.
Red Sox starter Joe Kelly was stingy in his first appearance against the Jays before leaving after facing one batter in the decisive seventh inning. Outside of a home run and single by Bautista, he allowed two walks and a hit batsman in the first six innings.
Kelly, who left his last start Friday with a "minor tweak" in his shoulder, exited in the seventh after giving up a double to Edwin Encarnacion. Ross then dropped a Dioner Navarro pop foul and the Toronto catcher took advantage, hitting a single to put Jays on first and third.
Boston manager John Farrell pulled left-hander Tommy Layne (1-1) in favour of Junichi Tazawa and Valencia greeted the right hander with a three-run shot to left field.
"I missed my location," Tazawa said through an interpreter.
It was the 20th career homer given up by Tazawa, eight of which have come against Toronto.
Tazawa and manager John Farrell suggested the pitcher may have been tipping his pitches against Toronto in the past.
"I think they picked up something that we felt like we corrected, probably two and a half months ago," said Farrell. "Tonight was a matter of a ball that ran back to the inner third of the plate against Valencia, rather than staying down and away from him."
Valencia celebrated the homer with a fist pump as he rounded the bases.
"I was fired up. I was turnt up," he said, using some modern vernacular for excited.
The Toronto hit parade continued with a Kevin Pillar double and RBI single by Jose Reyes, upping the Toronto lead to 5-2.
Bautista, who snapped an 0-17 slump with a home run Tuesday, went deep again in the first inning with a solo shot to centre field — his 26th homer of the season. Bautista's shot off the facing of the first outfield deck marked the first time in eight games that Toronto had scored first.
While there were costly errors on both sides, the fans were also treated to some fine fielding from Mike Napoli, Will Middlebrooks and Holt on the Boston side and Reyes, Munenori Kawasaki and Adam Lind for Toronto.
Bautista crashed into the stands down the first-base line trying to chase down a foul ball in the eighth inning but stayed in the game.
Ortiz, given Monday and Tuesday off after being hit by pitches on the elbow and foot on the weekend, returned to his DH role.
Follow @NeilMDavidson on Twitter