Luke Gregerson worked the eighth for the Padres and came on in the ninth in a bid to get the game into extra innings.
Gregerson, however, surrendered a drive that just reached the seats over the Green Monster.
Kyle Blanks singled in the only San Diego run in the first and Boston tied it in the fourth on an RBI double from Jarrod Saltalamacchia.
The homer by Gomes made a winner out of Koji Uehara (2-0), who pitched the top of the ninth.
Campus cop fatally shoots Texas student during traffic stop
Exploding whale video goes viral on Internet