Despite the potential of oral immunotherapy against food allergy, adverse reactions and loss of desensitization hinder its clinical uptake. Dysbiosis of the gut microbiota is implicated in the increasing prevalence of food allergy, which will need to be regulated to enable for an effective oral immunotherapy against food allergy. Here we report an inulin gel formulated with an allergen that normalizes the dysregulated ileal microbiota and metabolites in allergic mice, establishes allergen-specific oral tolerance and achieves robust oral immunotherapy efficacy with sustained unresponsiveness in food allergy models. These positive outcomes are associated with enhanced allergen uptake by antigen-sampling dendritic cells in the small intestine, suppressed pathogenic type 2 immune responses, increased interferon-γ+ and interleukin-10+ regulatory T cell populations, and restored ileal abundances of Eggerthellaceae and Enterorhabdus in allergic mice. Overall, our findings underscore the therapeutic potential of the engineered allergen gel as a suitable microbiome-modulating platform for food allergy and other allergic diseases.