GILROY, Calif. — The smell of barbecue was wafting through the air, a local rock band was playing its last song, and parents were collecting their children at the end of the annual garlic festival in Gilroy on Sunday when a gunman opened fire in a shooting that left three people dead, including a 6-year-old boy.