"I made a big mistake and put the ball club in a bad situtation and we didn't overcome it," said Foulke, who blew his third save in 16 tries. "That's one where I've definitely got to get the job done there."
With their second straight devastating walkoff loss, the Sox suffered their fourth straight defeat amid an ugly stretch in which they have gone 13-19 since last month.
"We definitely don't like the direction we're going in," said Johnny Damon, who scored the go-ahead run in the 10th on Ramirez's single off Kevin Gryboski. "It doesn't matter how you lose or how long it takes to lose. It's frustrating."
Ramirez, who had slugged an apparent winning homer in the 13th inning in the Bronx before the sky fell, fanned for the final out in the 12th inning with Damon on second base and Mark Bellhorn on first. It marked one of several late chances the Sox failed to convert as they went 3 for 14 with runners in scoring position.
"We had our chances, but we didn't capitalize," Francona said.
Foulke faltered by surrendering a double to left to Rafael Furcal leading off the 10th.
"It was definitely good hitting," Foulke said. "You don't see too many guys go the other way like that with my changeup."
But then Foulke sailed a wild pitch high and inside to Green, who was expected to sacrifice, allowing Furcal to reach third.
"That's the pitch that really killed us," he said. "They were going to give us an out, which I'd gladly take. But I was trying to get off the mound too quick and just air-mailed it to the backstop."
Martinez, who arrived before the game to replace the ailing Scott Williamson, held off the Braves in the 11th before he allowed a single to Mark DeRosa and a double to Furcal in the 12th.
"He's in a bind there," Francona said. "He was trying to get a strikeout and left the pitch up over the plate. That's a very difficult spot for a kid who just got here today."