Food allergy (FA), triggered by specific dietary allergens, is a growing global concern regarding public health and food safety. Our previous studies suggest that early exposure to certain allergenic proteins can lower FA risk, but the dose-response relationship remains unclear. In this study, BALB/c mice received 0.1-10 mg of ovalbumin (OVA) by gavage before sensitization. 0.1 mg of OVA failed to prevent FA, with a diarrhea incidence of 75%. In contrast, 1 mg of OVA provided partial protection, reducing the diarrhea incidence to 25%, while 5 or 10 mg of OVA fully prevented allergic reactions. Besides, higher OVA doses better suppressed Th2 polarization and increased tolerogenic cDC1 cell frequencies. Importantly, 5 mg of OVA restored gut microbial diversity and ameliorated metabolic dysregulation, while lower doses showed no significant improvement compared to the FA group. Overall, the OVA pretreatment prevents FA in a dose-dependent manner by modulating gut microbiota and metabolism.