Gene–environment interactions may increase gastric cancer (GC) risk. Seven susceptibility loci identified by genome‐wide association studies (GWASs) suggest that genetic factors play a role in gastric carcinogenesis. Meanwhile, Helicobacter pylori (H. pylori) infection, smoking, and alcohol drinking are also important environmental factors for gastric cancer. However, studies to explore the role of gene–environment interactions in gastric carcinogenesis, and particularly the relationship between the seven susceptibility loci and their potential interactions with H. pylori infection, smoking, and alcohol drinking in risk of GC, and severe intestinal metaplasia (IM)/dysplasia, have been inconclusive. A total of 1273 subjects in a Chinese population were recruited, and genotyping was carried out using the competitive allele‐specific PCR (KASP) method. Unconditional logistic regression was applied to model the associations between genetic polymorphisms and the disease risk. Effect modifications by H. pylori infection, smoking and alcohol drinking were evaluated. PSCA rs2294008/rs2976392 showed a significant, multiplicative interaction with H. pylori infection in risk of GC. Meanwhile, PRKAA1 rs13361707 had an additive interaction with H. pylori infection. SLC52A3 rs13042395 showed an interaction with alcohol drinking in risk of GC. Moreover, three SNPs, MUC1 rs4072037, ZBTB20 rs9841504 and PRKAA1 rs13361707, were associated with precancerous gastric lesions (severe IM/dysplasia). Our data suggest that genetic predisposition factors identified by GWAS may interact with environmental risk factors, Particularly for H. pylori infection and alcohol consumption, to increase the risk of GC.