Background Healthcare-associated urinary tract infections (HAUTIs) caused by gram-negative pathogens have emerged as a global concern. So far, little is known about the epidemiology of extended-spectrum β lactamase (ESBL)-producing Escherichia coli and Klebsiella pneumoniae in HAUTIs in India. The study was carried to determine the antibiotic resistance pattern and ESBL-producing genes in E. coli and K. pneumoniae strains isolated from HAUTIs in a tertiary institute in North India. Methods A total of 200 consecutive, nonduplicate clinical isolates of E. coli and 140 isolates of K. pneumoniae from hospitalized patients with UTI were collected during a period of 1 year. Strains were studied for the presence of ESBL genes (blaCTX-M1, blaCTX-M2, blaCTX-M9, blaCTX-M15, blaSHV, blaTEM, blaOXA-1, blaVEB, blaPER-2, and blaGES) by multiplex polymerase chain reaction using gene-specific primers. Results ESBL was detected in 82.5% (165 out of 200) isolates of E. coli and 74.3% (104 out of 140) isolates of K. pneumoniae by phenotypic confirmatory testing. From 269 phenotypically positive ESBL isolates, blaTEM (49.4%) was the most common genotype followed by blaCTX-M1 (31.97%), blaOXA-1 (30.1%), and blaSHV(11.9%) either alone or in combination. In the present study, blaCTX-M-15 (84.89%) was the most common blaCTX-M1-type ESBL. In total, 2.6 and 5.2% of the isolates were positive for PER-2 and VEB genes, respectively. Conclusion To the best of our knowledge, this is the first study on ESBL resistance patterns and ESBL-producing genes in HAUTIs in North India. Our study reports high occurrence with ESBL types CTX-M-1, CTX-M-15, TEM, and SHV. Minor ESBL variants OXA-1, VEB-type, and PER-2-type β-lactamase are also emerging in HAUTIs infections in North India.