Gonzalez was hit near the ear hole on his batting helmet with a fastball from Colorado's Jason Hammel and immediately grabbed his head and fell to the ground.
"I saw the ball ricochet and it's a scary thing," Padres starter Kevin Correia said. "Being a pitcher, it's scary for you and it's scary for the hitter."
He remained clutching his head in a prone position for several minutes before finally sitting up. Gonzalez walked to a cart with help from head trainer Todd Hutcheson and assistant trainer Paul Navarro and driven off the field.
Manager Bud Black said he was told by the trainers on the field that Gonzalez was "conscious, he was lucid and he knew what happened. But he was extremely dizzy and his ears were ringing."
Black said Gonzalez had gone to a hospital for tests but the results would not be known until Sunday.
"It's something you don't want to see happen," Hammel said. "I hope he's all right. I'll be checking in on him. I was effectively wild and, unfortunately, effectively wild was dangerous."
Edgar's brother, All-Star Adrian Gonzalez, was pulled from the game when the inning ended to go to the hospital where Edgar was being treated.