"Joe Mays pitched his tail off and gave us a chance to win today," manager Ron Gardenhire said.
Mays (5-3), who missed last season because of elbow surgery, allowed seven hits and two runs, walked two and struck out three. He has given up only three earned runs in his last 15 innings and lowered his ERA to 3.84.
"I'm just feeling really comfortable with all my pitches," Mays said. "It took me some time to find the right arm slot."
The Twins, who are 44-34 and well behind Chicago in the AL Central, are two games ahead of last year's pace when they were 42-36.
Mike Redmond drove in the go-ahead run in the seventh inning and Joe Nathan got his 10th straight save for Minnesota, which is 6-0 against the Devil Rays this season and has won the last eight meetings.
"We feel like we're starting to play a lot better now," Nathan said. "The way Chicago's playing, everybody but us has been a little worried."
Carl Crawford had three hits and Travis Lee homered for the Devil Rays, who have lost five straight and eight of nine. Tampa Bay fell to 8-32 on the road -- 4-2 at Yankee Stadium and 4-30 everywhere else.
"Lately we haven't been scoring any runs," manager Lou Piniella said. "It's been a struggle."
Rookie Scott Kazmir (3-6) gave up just four hits and three runs -- two earned -- while striking out six and walking two in seven innings. After walking the leadoff hitter, Kazmir retired 13 straight before allowing a hit.
"Kazmir pitched well," Piniella said. "All we need to do is get a few of these young pitchers a few wins and let them get a little wind under their sails."
LeCroy broke up the no-hit bid with one out in the fifth, when he hit a 419-foot homer to center to bring Minnesota to 2-1. It was LeCroy's eighth homer.
"I was just looking for a pitch down," LeCroy said. "With that kid, if he threw anything up you weren't going to hit it."
The Twins tied it at 2 in the sixth with a squeeze play.
Luis Rodriguez led off with a double and went to third with one out on Kazmir's errant pickoff attempt.
"I felt like I had trouble just getting out of the blocks, making the turn," Kazmir said. "I kind of swung my shoulder and just opened it up."
On the next pitch, Juan Castro laid down a perfect bunt with Rodriguez already racing home to score the unearned run.
Torii Hunter led off the seventh with a double off Kazmir and scored two outs later on Redmond's single to center to make it 3-2.
Crawford led off with his eighth triple, and one out later Huff lifted a ball to shallow left. Ford was in position to make the catch, but he appeared to lose the ball in the Metrodome roof and it fell between him and shortstop Castro.
Lee led off the fourth with a 431-foot home run off Mays to make it 2-0.
Nathan pitched the ninth for his 23rd save in 25 chances.
Tampa Bay outfielder Chris Singleton was granted his release. Singleton opened the season with the Devil Rays but was designated for assignment on May 20 and released a week later. He signed a minor-league contract with the team earlier this week and was brought up from Triple-A Durham on Saturday. Piniella said he expected the team to call up an infielder on Monday. ... The Devil Rays have been swept 10 times this season and in two of their last three series. ... LeCroy is hitting .400 (6-for-15) with three homers and five RBI in his last 10 games. ... Redmond threw out Crawford trying to steal second. It was only the fifth time in 29 tries that Crawford has been thrown out. But Redmond has cut down seven of 12 attempted basestealers this season.