Dotel (3-3) allowed two hits and struck out two, giving Chicago's bullpen some rest one night after the White Sox used five relievers in an 11-3 loss to Oakland.
"I just wanted to win or lose the game," Dotel said. "I just said give me one more, give me one more."
Ramirez drove in two runs for the White Sox, who have won six of eight and moved within 6½ games of AL Central-leading Detroit.
"All we can do is try to win games and try to forget about Detroit," Dotel said. "Hopefully they lose, but don't worry about them, just think about ourselves and do our best. That's the only thing we can do now."
Chicago nearly handed Oakland a run in the top half of the 13th when center fielder Alex Rios dropped Scott Hairston's routine fly with one out. Hairston wasn't running hard and only made it to first. He then made another baserunning blunder when he was doubled off on Kurt Suzuki's high infield popup.
Oakland manager Bob Geren replaced left fielder Hairston with Eric Patterson in the bottom of the 13th.
"I just took him out of the game," said Geren, who had a chat with Hairston after the loss.
Chicago led 3-2 before Oakland rallied in the eighth. Tony Pena entered with the bases empty and two outs, and surrendered a double to Hairston and Suzuki's tying RBI single.
Oakland's bullpen allowed one run in 9 1/3 innings but the A's still lost their three-game winning streak.
"They did a hell of a job, especially all the new guys," Oakland starter Trevor Cahill said. "Guys you bring up in September and get their feet wet, slammed the door."
Freddy Garcia, making his fifth start since being called up from Triple-A Charlotte on Aug. 18, allowed two runs and five hits in six innings for the White Sox.
Chicago pushed across two runs in the second to take a 3-1 lead. Scott Podsednik, who finished with four hits, doubled in Chris Getz and Jayson Nix scored on third baseman Adam Kennedy's throwing error allowing Ramirez to reach.
Ryan Sweeney doubled in a run in the third for Oakland.
- White Sox RHP Jake Peavy threw an intense side session before the game that was somewhere between 50-60 pitches, but Peavy is still uncertain if a start in the majors is his next step. "I have no idea what the plans are," he said. "I did what I was asked to do today and I was excited to do that."
- Oakland RHP Vin Mazzaro, who has tendinitis in his pitching shoulder, threw a side session. There is no timetable for the rookie's next start.
- Oakland had a season-high five stolen bases. They were 5 for 8 on the night.
- Rookie 3B Gordon Beckham missed his fourth consecutive game with a strained right oblique. He is expected back in the lineup on Friday when Chicago begins a West Coast trip against the Los Angeles Angels.
- White Sox OF Jermaine Dye grounded out in the 11th with bases loaded. He was 0 for 6 and is in an 8-for-63 slump.
- Cahill allowed three runs in three innings.