With the game tied 2-2 in the sixth, Baltimore got a two-out RBI double from Chris Davis to take the lead.
Andino followed by smashing a pitch to center field that Jacoby Ellsbury caught on the run, but the ball came out of his glove as he crashed into the fence, allowing Mark Reynolds, Davis and Andino to score.
Troy Patton (2-1) earned the win with 1 2/3 innings of shutout relief for the Orioles, who took the first of a season-ending, three-game set.
Josh Beckett (13-7) was lit up for six runs on seven hits over six innings for the reeling Red Sox, who fell to 6-19 during an epic September swoon.
Boston entered the month with a 1 1/2-game lead in the American League East, but with their latest loss fell into a tie with Tampa Bay for the AL wild-card lead with two games to play.
Dennis Rodman pledges to end trips to North Korea
Jessica Simpson shares three-way kiss with friends in photo