"This is the fun time of the year," Cubs manager Dusty Baker said.
Todd Walker walked to open the Cubs' ninth against Brian Bruney (1-3), and was lifted for pinch-runner Ronny Cedeno. He advanced on rookie Matt Murton's sacrifice, and then Jose Macias walked to set up Barrett's single. Ramirez, who did not start because of a sore right quad, then hit a single to left.
Murton wasn't fazed by the pressure situation.
"I had three [sacrifice] attempts before I got here and I was succcessful three times," Murton said. "I work on my bunting, it's important for me to be a complete ballplayer. I got it down and we were fortunate enough to get the win."
Ramirez had good fortune, too.
"I tried to put the ball in play and it went through," Ramirez said. "I knew I'd get in at some point, and in the ninth inning I was ready."
Barrett also did not start and spent his time on the bench prepping for the pinch-hit at-bat. He was 2-for-9 off the bench, but hadn't forgotten a strikeout in the 10th inning Sunday in St. Louis with the bases loaded and the Cubs trailing. Good thing for him, Neifi Perez followed with a grand slam to give the Cubs the win.
Barrett talked to Nomar Garciaparra, Walker, Jeromy Burnitz, and Todd Hollandsworth about their approach to hitting. He probably even asked the grounds crew for tips. Something clicked.
"I really tried to focus on seeing the ball in a good area and making solid contact and not worry about the result," Barrett said. "I'm just a guy who likes to get the job done. When the game's on the line, great, but I just want to get the job done. We're at the time of year when every inning and every at-bat can mean the game. I want every at-bat to be a quality at-bat.
"It all came down to correct focus," Barrett said. "You get in those situations and you see the baserunners out there, and you see the opportunity to drive in the tying run or the winning run, and you tend to want the results before you do the job. Today, I decided to focus on making contact and let God take care of the rest."
Mark Prior did not get a decision because of one pitch. He gave up three runs on six hits and two walks over 7 1/3 innings in his seventh start since coming off the disabled list. He struck out eight and was mad at himself for a mistake to Troy Glaus in the eighth.
The D-Backs trailed, 2-1, when pinch-hitter Quinton McCracken and Craig Counsell each singled in the eighth. Both advanced on Chad Tracy's sacrifice, and Luis Gonzalez was intentionally walked to load the bases. Glaus knocked an 0-2 pitch into left to score McCracken and Counsell, and put Diamondbacks ahead, 3-2.
"I was trying to go low and away. It wasn't a good pitch," Prior said. "I'm not going to lie -- I'm not happy with the way I threw the ball all day. I had good stuff and I didn't use it as effectively as I could have. I'm very unhappy about that. [Javier] Vazquez is a great pitcher and it was going to be a battle. He threw the ball well today, too. The most important thing is we won the ballgame."
Vazquez nearly avenged an Opening Day 16-6 loss to the Cubs. Vazquez was the losing pitcher in the April 4 game in Arizona, lasting 1 2/3 innings in that game, and was charged with seven runs on 10 hits. This was a different Vazquez. He served up two runs on five hits over seven innings and struck out four.
With one out in the Cubs' second, Macias singled and reached second on an error by Tracy in right to set up Henry Blanco's fourth home run off a 3-2 pitch from Vazquez.
Tony Clark doubled and reached third on center fielder Jerry Hairston's fielding error in the Diamondbacks' seventh before scoring on Shawn Green's groundout. Hairston had trouble getting a grip on the ball.
Not all of the Cubs players wear the "Believe" bracelets, but they all believe in themselves and in the team. Chicago started the day three games back in the National League Wild Card race.
"You've got to believe it. Belief is a powerful thing," Baker said.
"We're all in this thing together, from seat 229 to the dugout," Barrett said. "When Mark gave up the hit [to Glaus], we were all thinking the same thing. That was gut-wrenching and an awful feeling because Mark pitched so well. I felt Mark pitched too well to get a loss."
So he put his batting gloves on and got ready.
"We all feel that as long as we can stay together, we have a chance to win," Barrett said. "There are a lot of teams that are shedding players right now. I've been on those teams before, and I'm glad that I'm on a team that's not doing that. I thank God and thank the team for allowing us to stay together."