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.
Notable deaths of 2014 [PHOTOS]