The functional gene diversity and structure of microbial communities in a shallow landfill leachate-contaminated aquifer were assessed using a comprehensive functional gene array (GeoChip 3.0). Water samples were obtained from eight wells at the same aquifer depth immediately below a municipal landfill or along the predominant downgradient groundwater flowpath. Functional gene richness and diversity immediately below the landfill and the closest well were considerably lower than those in downgradient wells. Mantel tests and canonical correspondence analysis (CCA) suggested that various geochemical parameters had a significant impact on the subsurface microbial community structure. That is, leachate from the unlined landfill impacted the diversity, composition, structure, and functional potential of groundwater microbial communities as a function of groundwater pH, and concentrations of sulfate, ammonia, and dissolved organic carbon (DOC). Historical geochemical records indicate that all sampled wells chronically received leachate, and the increase in microbial diversity as a function of distance from the landfill is consistent with mitigation of the impact of leachate on the groundwater system by natural attenuation mechanisms.