Game 4 in the best-of-five matchup is Monday in Chicago, with Gavin Floyd facing Tampa Bay's Andy Sonnanstine.
Less than 24 hours after the Cubs were swept out of the playoffs by the Dodgers, dashing Chicago's hopes for a crosstown World Series, the White Sox avoided elimination before a black-shirted, white towel-waving crowd of 40,142 in their home park.
"At least we play tomorrow," White Sox manager Ozzie Guillen said. "Like I say, we played against the wall before and came out of it."
As for that other team in Chicago?
"I could care less about the Cubs," he said.
Danks, who beat Minnesota 1-0 last Tuesday in the tiebreaker for the AL Central title, shut down the Rays for 6 2-3 innings.
"I was more nervous going into the Minnesota game than this game," he said. "Guys try to approach it like a game in June. I think that helps take pressure off us."
The 23-year-old lefty gave up five hits and a run before B.J. Upton hit a long, two-run homer with two outs in the seventh that made it 5-3.
After a single by Carlos Pena, Octavio Dotel threw a third strike past Evan Longoria.
Bobby Jenks pitched the ninth, striking out Pena with a nasty curveball with a runner on for his fifth postseason save. He had four in 2005, including two in the World Series victory over Houston.
The Rays are only the second team in major league history -- first in the AL -- to make the postseason after having the worst record in the majors the previous season. Tampa Bay went from 96 losses to 97 victories and was trying to become the fifth team to sweep its first postseason series.
After the Rays won 6-4 and 6-2 at home, the White Sox were revived at U.S. Cellular Field, where they were 54-28 this season.
"It's a bad assumption to think you are going to come in and beat up on them," Rays manager Joe Maddon said. "They are very good here."
Matt Garza, pitching on eight days' rest, was popping his fastball in the mid-90s (mph) and trying to keep the homer-reliant White Sox off balance by changing speeds. The White Sox caught up with the 24-year-old righty in the fourth.
Jim Thome opened with double off the center-field fence, Paul Konerko walked and Ken Griffey Jr. hit a sharp single that loaded the bases.
Alexei Ramirez, who hit a record four grand slams as a rookie this season, hit a sacrifice fly to center for a 2-1 lead, and veterans Konerko and Griffey alertly moved up a base. Wise followed with a two-run, opposite-field double to left.
Wise, who hit a three-run homer in the opener at Tropicana Field, had been designated for assignment by Chicago on May 31. But the White Sox brought him back from the minors in June, and he's seen increased playing time since Carlos Quentin went down with a broken wrist Sept. 1.
Since his career began in 1997, the 31-year-old Wise has played in only 240 regular-season major league games and another 935 in the minors.
Griffey had two singles. After he walked in the sixth, he was replaced by younger and faster Brian Anderson, who stole second and moved up on an infield out when Longoria made a nice play from behind third base on Ramirez's grounder.
Wise grounded out, but Juan Uribe delivered another two-out single and the White Sox were up 5-1.
Garza lasted six innings, allowing seven hits and five runs.
Akinori Iwaumra, who hit a two-run homer off Mark Buehrle in Game 2, gave the Rays a 1-0 lead in the second with an RBI infield single to first, beating Danks to the bag.
Chicago tied it in the third when Wise worked a leadoff walk, stole second and A.J. Pierzynski delivered a two-out RBI single to center.
Danks pitched out of a first-and-third jam in the first after giving up two singles. He retired Longoria on a short fly to right and Carl Crawford on a comebacker.