The frame began with back-to-back singles by Jackie Bradley Jr. and Dustin Pedroia, before Smyly walked Mookie Betts with two outs. Ramirez then proceeded to crush a first-pitch fastball that cleared the bases.
"I just wish I could go back to that moment. In my head, I was thinking, 'Be careful. You don't have to go right at him. You can still get out of the inning with the lead.' But he jumped on that first pitch," Smyly said. "It definitely makes you second-guess the pitch call. I had conviction, I just left it over the middle."
According to Statcast™, the ball landed 426 away from home plate and had an exit velocity of 105 mph.
Smyly, who would take a no-decision, allowed five runs on seven hits, fanned four and issued two free passes over five innings.
"It is just one of those games that you wish you could have back," Smyly said. "The team gave me a good cushion and I felt like I was throwing the ball really well, and then the fifth inning came along."
Smyly had been on quite a roll coming into Wednesday's contest, going 4-0 with a 2.82 ERA over his last seven starts, all of which were at least six innings.
Smyly has surrendered a career-high 29 home runs this season, and 49 of the 92 (53.2 percent) runs he's allowed have come via the long ball.
"The home run has kind of beat us up," Rays manager Kevin Cash said. "As a staff, it comes down to execution. You usually don't see well-executed pitches leave the ballpark. If you go and look back, I'm sure they aren't in the ideal location."
Quinn Roberts is a reporter for MLB.com based in Boston and covered the Rays on Wednesday. This story was not subject to the approval of Major League Baseball or its clubs.