ABSTRACT Intramammary (IMM) ceftiofur treatment is commonly used in dairy farms to prevent mastitis, though its impact on the cattle gut microbiome and selection of antibiotic-resistant bacteria has not been elucidated. Herein, we enrolled 40 healthy dairy cows after lactation: 20 were treated with IMM ceftiofur (Spectramast®DC) and a non-antibiotic internal teat sealant (bismuth subnitrate) and 20 (controls) received only bismuth subnitrate. Fecal samples were collected before (day −1) and after treatment (weeks 1, 2, 3, 5, 7, and 9) for bacterial quantification and metagenomic next-generation sequencing. Overall, 90% and 24% of the 278 samples had Gram-negative bacteria with resistance to ampicillin and ceftiofur, respectively. Most of the cows treated with ceftiofur did not have an increase in the number of resistant bacteria; however, a subset (25%) shed higher levels of ceftiofur-resistant bacteria for up to 2 weeks post-treatment. At week 5, the antibiotic-treated cows had lower microbiome abundance and richness, whereas a greater abundance of genes encoding extended-spectrum β-lactamases (ESBLs), CfxA, ACI-1, and CMY, was observed at weeks 1, 5 and 9. Moreover, the contig and network analyses detected associations between β-lactam resistance genes and phages, mobile genetic elements, and specific genera. Commensal bacterial populations belonging to Bacteroidetes most often possessed ESBL genes followed by members of Enterobacteriaceae. This study highlights variable, persistent effects of IMM ceftiofur treatment on the gut microbiome and resistome in dairy cattle. Antibiotic-treated cattle had an increased abundance of specific taxa and genes encoding ESBL production that persisted for 9 weeks, while fecal shedding of ESBL-producing Enterobacteriaceae varied across animals. Together, these findings highlight the need for additional studies that identify factors linked to shedding levels and the dissemination and persistence of resistance determinants on dairy farms in different geographic locations.