J.D. Drew also homered for the Red Sox, who trailed 5-2 before rallying to end a three-game skid. Despite the victory, Boston remained eight games behind AL East-leader New York and seven games behind second-place Tampa Bay.
Lester improved to 13-0 lifetime against Baltimore, but this one wasn't easy. The left-hander yielded more runs (five) in the first two innings than in any of his previous 15 outings against the Orioles, but settled down in time to give Boston a chance to make up the deficit.
Lester (15-8) allowed five runs and eight hits in six innings. He struck out 10, walked two, hit a batter and threw a wild pitch.
When Lester walked off the mound for the last time, Boston trailed 5-3. He then watched in the dugout as the Red Sox batted around in the seventh.
Scutaro's two-run homer off Mark Hendrickson (1-5) tied it. Victor Martinez added an RBI double off Alfredo Simon, and Beltre followed an intentional walk to David Ortiz with a three-run shot.
Jonathan Papelbon worked the ninth for his 34th save.
Adam Jones had two RBIs and Julio Lugo scored twice for the Orioles, whose four-game winning streak ended. Baltimore fell to 17-11 under Buck Showalter, who will have to wait at least another day to become the 64th manager in big league history to reach 900 wins.
Boston went up 1-0 in the first inning when Scutaro got an infield hit and scored on a two-out double by Ortiz, who reached the 80-RBI mark for an eighth consecutive season.
Baltimore responded with four runs on four hits in the bottom half, an uprising fueled by Lester's lack of control. After Lester hit Ty Wigginton with a pitch to load the bases, Jones hit a two-run double. Wigginton then scored on a wild pitch and Felix Pie hit an RBI double off the right-field wall.
The Red Sox got a run back in the second when Ryan Kalish broke a 3-for-29 slump with an RBI double. The Orioles made it 5-2 in the bottom half when Wigginton drove in a run with a two-out single.
After that, Lester retired 11 straight batters — seven on strikeouts.
Drew snapped an 0-for-14 skid in the fifth with his 18th homer.
Notes: The game was delayed in the ninth when home plate umpire Tom Hallion was struck by a foul ball. ... Jones left with upper back soreness. ... Nolan Reimold, one of the Orioles' three callups on Wednesday, went 1 for 3 with a sacrifice fly as the DH. His sixth-inning single was his first hit in the majors since May 11. ... Lester reached double-digits in strikeouts for the fifth time this season and 12th time of his career. ... Every Boston starter had at least one hit.