Barmes circled the bases for a two-run inside-the-park homer while Gonzalez stayed on the Coors Field grass in obvious pain, an injury that occurred as he dived for the ball.
The Rockies held off a late Padres rally for a 11-10 victory over San Diego, which scored four runs in the ninth inning.
The partially dislocated shoulder was no news to Gonzalez, who suffered a similar injury in the Minor Leagues and once before when he was playing his college baseball at San Diego State.
"A couple of days," Gonzalez said as to when he would likely return.
Gonzalez left the game and was replaced by Will Venable.
"He's doing fine. ... [The shoulder] goes out and it goes back in," Padres manager Bud Black said. "In a couple of days, he'll be fine."
Gonzalez missed 43 games earlier this summer when he suffered a concussion after he was hit in the helmet by a pitch thrown by Colorado's Jason Hammel in July.
Gonzalez, the older brother of All-Star first baseman Adrian Gonzalez, had two hits on Tuesday, including a three-run double in the third inning.
Corey Brock is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.Less