Joyce, one day after being hit by a pitch that sparked a bench-clearing scrum, put the Rays up 7-3 on a two-run shot in the fifth that ended Lester's night.
"It's a great feeling, especially to help your team win," Joyce said. "I've never really been the type of person to talk a lot of trash, so I wanted, of course, to come out and play a good game. Play the game the right way and win the ballgame."
Lester (6-3) had his winless streak reach five starts, including three losses, since beating the Rays on May 15. The left-hander gave up seven runs, eight hits and seven walks in 4 2/3 innings.
"Over the last two or three, I think I've thrown the ball better than what the linescore showed," Lester said. "This one, obviously, it is what it is. It's just terrible. I did a terrible job of helping our bullpen out, a terrible job of keeping the ball down in the zone. The list goes on. This is solely on me. I just flat out didn't get it done."
The teams were coming off a testy 14-inning game Monday night won by the Red Sox 10-8 that took 5 hours, 24 minutes. An on-field scrum took place in the sixth after Boston's John Lackey hit Joyce in the center of the back with a pitch.
Lackey insisted he meant no harm, though the Rays hardly were convinced of that as Joyce and Tampa Bay manager Joe Maddon both said it was intentional.
"I'm sure he was, definitely, mentally involved in this game," Maddon said of Joyce. "He had himself a nice night."
Hernandez hit Dustin Pedroia, who was leading off the eighth Tuesday, with a pitch that got away from the right-hander. Pedroia immediately ran to first base and nothing else ensued.
The Rays grabbed a 4-3 lead during the third on run-scoring singles by Ryan Roberts and Jose Molina. Longoria made it 5-3 on a solo shot in the fourth.
Tampa Bay took a 2-1 advantage on Jennings' solo homer in the second. He also had a solo drive off Jose De La Torre in the fifth for his third career multihomer game.
"Anytime they get over the fence it feels pretty good," Jennings said.
Mike Napoli had a two-run single in the third that put Boston ahead 3-2.
After Pedroia gave the Red Sox a 1-0 lead in the first with a sacrifice fly, Tampa Bay tied it in the bottom half when James Loney walked with the bases loaded on the fourth free pass of the inning issued by Lester.
"The first inning kind of sums up the whole night," Lester said. "I was not able to repeat whatever pitch it may be, fastball, curveball, changeup, cutter. I just was not able to repeat, whether it be a location or just the pitch itself. It's not good."
Boston's Jose Iglesias extended his hitting streak to 14 games with a single in the third. Pedroia had his 14-game hitting streak end.
Joyce is 4-for-8 with two homers against Lester. ... The Rays have hit four or more homers in consecutive games for the first time in team history. ... Boston RHP Clay Buchholz (neck stiffness) will have his next start on Friday pushed back at least two days. ... Tampa Bay LHP David Price (strained left triceps) will throw in a simulated game Thursday. ... Maddon said RHP Kyle Farnsworth, who left Monday's game with right elbow soreness, felt pretty good Tuesday. The reliever played catch before the game and said he was available to pitch Tuesday.
Copyright by STATS LLC and The Associated Press
ST. PETERSBURG, FL - JUNE 11: Infielder Dustin Pedroia #15 of the Boston Red Sox signs autographs before play...
16,870 (49.5% full) - % is based on regular season capacity
Home Plate - Chris Guccione, First Base - Ron Kulpa, Second Base - Phil Cuzzi, Third Base - Tom Hallion
Dustin Pedroia snapped his 14-game hit streak Tuesday vs Rays, T-5th longest hit streak of career (went 0-2).
It was the 3rd-longest active streak in the majors entering play on Tuesday (behind David Freese and Matt Carpenter).
Rays : 1st time in team history that they've hit 4 HR in consecutive games.
They join the Nationals as the only teams with consecutive 4-HR games this season.