The aim of this study was to identify the clinical, demographic, lifestyle factors and selected genetic polymorphisms that affect the susceptibility towards Helicobacter pylori (H. pylori) infection in gastric cancer patients. Histological confirmed gastric adenocarcinoma cases that underwent curative gastrectomy between 2002 and 2012 were included. Gastric biopsy samples were obtained to determine the H. pylori status, and further cagA status and vacA m and s genotypes by polymerase chain reaction. Patients were interviewed with structured questionnaires, and blood samples were collected for EPHX1, GSTM1, GSTT1, IL1B, IL1-RN, MTHFR and p53 genotyping. Proportions were compared in univariate analysis, while the relation between putative risk factors and H. pylori status and genotype were measured using logistic regression analysis. One hundred forty-nine gastric cancer patients were included, of which 78.5% were H. pylori positive. Among positive patients 50% were cagA+, 72.5% vacA m1 and 80.7% vacA s1. The presence of cagA was less frequent among vacA m1 (p = 0.031) and vacA s1 (p = 0.052) subtypes. The presence of father history for any cancer was a significant risk factor for H. pylori infection [adjusted odds ratio (OR) = 8.18, 95% confidence interval (CI) 1.04-64.55]. EPHX1 exon 3 T > C (OR = 0.35, CI 95% 0.13-0.94), IL1B-511 T > C (OR = 0.38, CI 95% 0.15-0.97) and IL1-RN VNTR (OR = 0.19, CI 95% 0.06-0.58) polymorphisms were protective towards H. pylori infection in the univariate analysis. Wine consumption was associated with higher risk of carrying the H. pylori vacA m1 virulent subtype (p = 0.034). Lastly, cardiovascular diseases were less common among cagA positive subjects (p = 0.023). Father history of any cancer is a risk factor for H. pylori infection. Polymorphisms in IL1B-511, IL1-RN and EPHX1 exon 3 genes might be protective towards H. pylori infection.