Multidrug resistance mediated by β-lactamase in Gram-negative bacilli is a serious public health problem. Sewers are considered reservoirs of multiresistant bacteria due to presence of antibiotics that select them and favor their dissemination. The present study evaluated the antibiotic resistance profile and β-lactamases production in Gram-negative bacilli isolates from hospital sewage and urban wastewater treatment plants (UWWTP) in Brazil. Bacteria were isolated and identified with biochemical tests. Antibiotic susceptibility testing was performed by the disk-diffusion method and detection of extended-spectrum β-lactamase and carbapenemases by enzymatic inhibitor and conventional PCR. Differences in resistance to amoxicillin clavulanic, aztreonam, cefepime, and cefotaxime were observed in hospital sewage compared with urban sewage (p < 0.05). The multidrug-resistant phenotype was observed in 33.3% of hospital sewage isolates (p = 0.0025). β-lactamases genes were found in 35.6% of isolates, with the most frequent being blaKPC and blaTEM (17.8%), and blaSHV and blaCTX-M (13.3% and 8.9%, respectively). The data obtained are relevant, since the bacteria detected are on the priority pathogens list from the World Health Organization and hospital sewage could be released untreated into the municipal collection system, which may favor the spread of resistance. Changes in hospital sewage discharge practices, as well as additional technologies regarding effluent disinfection in the UWWTP, can prevent the spread of these bacteria into the environment and negative impact on water resources.