Background Chronic inflammation plays a critical role in the pathogenesis of the 2 major types of gastric cancer. Several foods, nutrients, and nonnutrient food components seem to be involved in the regulation of chronic inflammation. Objective We assessed the association between the inflammatory potential of the diet and the risk of gastric carcinoma, overall and for the 2 major subsites: cardia cancers and noncardia cancers. Design A total of 476,160 subjects (30% men, 70% women) from the European Investigation into Cancer and Nutrition (EPIC) study were followed for 14 y, during which 913 incident cases of gastric carcinoma were identified, including 236 located in the cardia, 341 in the distal part of the stomach (noncardia), and 336 with overlapping or unknown tumor site. The dietary inflammatory potential was assessed by means of an inflammatory score of the diet (ISD), calculated with the use of 28 dietary components and their corresponding inflammatory scores. The association between the ISD and gastric cancer risk was estimated by HRs and 95% CIs calculated by multivariate Cox regression models adjusted for confounders. Results The inflammatory potential of the diet was associated with an increased risk of gastric cancer. The HR (95% CI) for each increase in 1 SD of the ISD were 1.25 (1.12, 1.39) for all gastric cancers, 1.30 (1.06, 1.59) for cardia cancers, and 1.07 (0.89, 1.28) for noncardia cancers. The corresponding values for the highest compared with the lowest quartiles of the ISD were 1.66 (1.26, 2.20), 1.94 (1.14, 3.30), and 1.07 (0.70, 1.70), respectively. Conclusions Our results suggest that low-grade chronic inflammation induced by the diet may be associated with gastric cancer risk. This pattern seems to be more consistent for gastric carcinomas located in the cardia than for those located in the distal stomach. This study is listed on the ISRCTN registry as ISRCTN12136108.