BOSTON (AP) -- Jonny Gomes hit a go-ahead two-run pinch homer in the sixth after another two-run shot in the inning by Xander Bogaerts and the Boston Red Sox beat the Kansas City Royals 5-4 on Friday night.
The Red Sox maintained their momentum after winning four of their last five games before the All-Star game. They entered the break in last place in the AL East but were coming off Clay Buchholz's 11-0 complete-game win over Houston, their season high for runs.
Buchholz (5-5) allowed four runs in six innings against Kansas City. Koji Uehara allowed Omar Infante's two-out double in the ninth but got his 19th save in 21 chances.
Scott Downs (0-3) gave up the homer to Gomes, the first batter he faced after replacing James Shields.
Eric Hosmer had three hits and two RBIs for the Royals as he extended his hitting streak to 14 games.
Daniel Nava started Boston's four-run rally with a one-out single that slid out of left fielder Alex Gordon's glove as he dove. Bogaerts was in a 14 for 123 (.114) slump, but hit Shields' 1-1 pitch into the center-field bleachers.
That cut the deficit to 4-3 and Stephen Drew, batting .158 in 29 games since joining the Red Sox in late May, followed with a ground-rule double. After David Ross struck out, lefty Downs came in to face lefty Jackie Bradley Jr.
But the right-handed Gomes pinch hit and drove a 2-2 pitch to nearly the same spot where Bogaerts' homer landed. It was Gomes' sixth homer of the year and his second as a pinch hitter.
The Royals had taken a 1-0 lead in the first on a double by Infante and an RBI single by Hosmer.
The Red Sox tied it in the second when Bogaerts reached first on a throwing error by shortstop Infante, and Drew and Brock Holt singled.
Kansas City made it 3-1 in the fourth on run-scoring singles by Salvador Perez and Gordon than added a run in the fifth on Hosmer's RBI single.
David Ortiz led off the third for Boston and was out on a strange play.
He hit a towering popup to the first-base side of the mound. Shields appeared uncomfortable trying to catch it so first baseman Hosmer and third baseman Mike Moustakas raced in to help. Hosmer raised his glove, but the ball ticked off it and Moustakas cradled it for the out.
More strange glove work occurred in the top of the fourth when Hosmer hit the ball sharply down the first-base line.
A ball girl, seated beside the low fence in foul territory, fielded it cleanly then quickly dropped it. It was too late, though, and Infante, who had singled, was stopped at third while Hosmer reached second. Both ended up scoring anyway on the singles by Perez and Gordon.
Notes: Boston is 33-0 when leading after the eighth, the only team that hasn't lost with a lead going into the ninth. ... Of Gomes' 19 homers in two seasons with the Red Sox, six have been as a pinch hitter. He passed Joe Cronin for second most in club history and trails only Ted Williams, who had seven. ... Danny Duffy (5-9) pitches for the Royals against Rubby De La Rosa (2-2) in the second game of the series Saturday night.