X-rays were negative, and Ramirez will return to the lineup when the soreness goes away.
"We'll check on him when he comes in tomorrow, but after the hit by pitch, he had a difficult time gripping the bat and we had to get him out of there," said Red Sox manager John Farrell.
Ramirez has been struggling to regain his production since coming back from a left shoulder sprain he suffered on May 4.
Daniel Nava replaced Ramirez in left field. The Red Sox were trailing, 11-3, at the time Ramirez came out of the game.
Nava (.167 average) has struggled all season and hit into a double play to end the most promising rally of the night for the Red Sox in the bottom of the seventh.
"Well, he's in a situation where he's coming in to spell guys and that was the case here tonight," said Farrell. "Daniel has had very good stretches for us and is a very productive hitter. We know early last year he was in a situation similar to where he's at right now."