Teresa Giudice is lucky -- she was at the Gilroy Garlic Festival the day before a gunman opened fire ... killing 3 people and injuring at least 15 others.
"The Real Housewives of New Jersey" star says she's heartbroken over yet another mass shooting in the U.S. ... this one at a food fest in Northern California.
Giudice was at the event on Saturday to promote her cookbook and participate in the Garlic Cook-Off. She was photographed with some of the finalists of the Miss Gilroy Garlic Festival 2019 contest, as well.
On Sunday, around 5:30 PM, a gunman wearing tactical gear opened fire on the crowd with an assault rifle.
Among the 3 deceased include a 6-year-old boy named Stephen Romero, who was there with his grandparents, who were also injured in the attack.
The gunman -- who's been identified as 19-year-old Santino William Legan -- was shot and killed by police ... reportedly just a minute after he began firing "somewhat randomly" at the crowd. Cops are still looking for a possible accomplice.
Guidice says she's thinking of the staff, volunteers and many families as they all "navigate this tragic situation."