The win was the right-hander's first in almost three months.
Sosa homered in the first inning for Chicago's lone run, and Grace got his milestone hit in the ninth.
"I'm just glad I didn't give up all 2,000," Hermanson said.
Hermanson (4-10) struck out five and walked two in winning for the first time since May 8. Ugueth Urbina got the final out for his 22nd save.
"It's almost impossible to go two, three months without winning," Montreal manager Felipe Alou said.
Kevin Tapani (6-9) lost his fourth straight game. The right-hander, who hasn't won since June 24, allowed three runs on six hits over eight innings.
Grace said the only thing that would've made his milestone better was if it were a game-winning hit or came in a win. The Cubs lost for the eighth time in their last 10 games.
"When I stepped up, I looked over in their dugout and Felipe Alou put his hands together as if to say, `Go get it,"' Grace said. "It makes me feel good that I got it off a guy who had good stuff toniht."
Grace, who started the game with 1,998 career hits, got No. 2,000 with two outs in the ninth. The Wrigley Field fans stood during the at-bat and gave him a standing ovation after his single to right.
"With three guys going after 3,000, it's probably an `also ran' type of story," said Grace, who had two bottles of champagne on ice waiting for him at his locker plus the lineup card and the ball.
"This is a big milestone for me personally. For a 24th-round draft pick, I think I've done pretty well."
Cabrera hit his sixth home run with one out in the fifth, scoring Rondell White, who had singled, to go ahead 3-1.
Sosa hit a 1-1 pitch with two outs in the bottom of the inning into the left-field bleachers to stay tied with St. Louis' Mark McGwire for the major league lead.
The duo started Monday deadlocked with 40 homers each, but McGwire later hit his 41st in St. Louis' game against San Diego.
"You can't think about it," Sosa said of his home run totals. "I take it like it's an every day job."
Brad Fullmer had a two-run double with two outs in the eighth.
©1999 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed