The aim of this study was to define the relationship between several environmental, laboratory, and genetic factors, i.e., TLR2 and NLRP3 polymorphisms, and Helicobacter pylori (H. pylori) infection in children, by comparing three different groups of pediatric subjects: H. pylori-induced gastritis, non-H. pylori gastritis, and healthy controls. Our final study sample included 269 children, which were divided into three groups according to the histopathological exam: group 1 with 51 children with H. pylori-induced gastritis, group 2 with 103 children with H. pylori-negative gastritis, and group 3 (control group) with 115 children without any histopathological changes. All children underwent a thorough anamnesis, clinical exam, laboratory tests, and upper digestive endoscopy with gastric biopsy for rapid urease test, histopathological exam, and genetic analysis of TLR2 rs3804099, TLR2 rs3804100, and NLRP3 rs10754558 gene polymorphisms. We noticed a significant association between living conditions and the type of gastritis (p < 0.0001). Both rapid urease and serological tests were significantly associated with the presence of H. pylori (p < 0.0001). The CT variant genotype of TLR2 rs380499 was significantly associated with neutrophil count (p = 0.0325). We noticed a significant association between the CC variant genotype of NLRP3 rs10754558 and leucocytes, neutrophils, eosinophils, as well as ALT (p = 0.0185, p = 0.0379, p = 0.0483, p = 0.0356). Based on these findings, we state that poor living conditions and rural areas represent risk factors for H. pylori infection. The rapid urease test is a reliable diagnostic tool for this infection. CT and TT carriers of TLR2 rs3804099, as well as CC carriers of NLRP3 rs10754558, might display a more severe degree of systemic inflammation.