Inflammatory bowel disease (IBD) is a result of a complex interplay between genes, host immune response, gut microbiota, and environmental factors. As one of the crucial environmental factors, diet plays a pivotal role in the modulation of gut microbiota community and the development of IBD. In this review, we present an overview of dietary patterns involved in the pathogenesis and management of IBD, and analyzed the associated gut microbial alterations. A Westernized diet rich in protein, fats and refined carbohydrates tends to cause dysbiosis and promote IBD progression. Some dietary patterns have been found effective in obtaining IBD clinical remission, including Crohn’s Disease Exclusion Diet (CDED), Mediterranean diet (MD), Anti-Inflammatory Diet (AID), the low-“Fermentable Oligo-, Di-, Mono-saccharides and Polyols” (FODMAP) diet, Specific Carbohydrate Diet (SCD), and plant-based diet, etc. Overall, many researchers have reported the role of diet in regulating gut microbiota and the IBD disease course. However, more prospective studies are required to achieve consistent and solid conclusions in the future. This review provides some recommendations for studies exploring novel and potential dietary strategies that prevent IBD.