Human genetic variation affects the gut microbiota through a complex combination of environmental and host factors. Here we characterize genetic variations associated with microbial abundances in a single large-scale population-based cohort of 5,959 genotyped individuals with matched gut microbial metagenomes, and dietary and health records (prevalent and follow-up). We identified 567 independent SNP–taxon associations. Variants at the LCTlocus associated with Bifidobacteriumand other taxa, but they differed according to dairy intake. Furthermore, levels of Faecalicatena lactarisassociated with ABO, and suggested preferential utilization of secreted blood antigens as energy source in the gut. Enterococcus faecalislevels associated with variants in the MED13Llocus, which has been linked to colorectal cancer. Mendelian randomization analysis indicated a potential causal effect of Morganellaon major depressive disorder, consistent with observational incident disease analysis. Overall, we identify and characterize the intricate nature of host–microbiota interactions and their association with disease.