Michael Chavis and Marco Hernández each drove in two runs and David Price (6-5-1-2-10, 103) struck out 10 in six innings.
Mookie Betts and Andrew Benintendi began the third inning with singles. Xander Bogaerts and Rafael Devers struck out, but Chavis greeted reliever Austin Pruitt with a double to center, giving Boston a 2-0 lead.
The Rays scored in the top of the fifth and the Red Sox answered with Bogaerts's sac fly, which scored Betts, who had doubled and taken third on Benintendi's groundout.
In the sixth, Chavis walked and Brock Holt singled. Vázquez bunted the runners to second and third.