The Gilroy Garlic Festival was about to finish for the weekend on Sunday evening, when shots were fired at the site.
There was "a white man in his early to mid-30s firing a rifle," eyewitness Julissa Contreras told NBC.
Video posted on social media showed people running away from the festival site amid general confusion.
The Santa Clara County Medical Center has so far admitted two victims, CBS reports.
"It was just rapid firing," Ms Contreras told NBC Bay Area. "I could see him shooting in just every direction. He wasn't aiming at anyone specifically.
"It was just left to right, right to left. He definitely was prepared for what he was doing."
"We were just leaving and we saw a guy with a bandana wrapped around his leg because he got shot," 13-year-old Evenny Reyes told the San Jose Mercury News.
The Gilroy Garlic Festival has been held annually since 1979. Christmas Hill Park, where the event was taking place, bans weapons of any kind, according to the festival's website.