The heightened cardiovascular disease (CVD) risk observed among omnivores is thought to be linked, in part, to gut microbiota-dependent generation of trimethylamine-N-oxide (TMAO) from L-carnitine, a nutrient abundant in red meat. Gut microbial transformation of L-carnitine into trimethylamine (TMA), the precursor of TMAO, occurs via the intermediate γ-butyrobetaine (γBB). However, the interrelationship of γBB, red meat ingestion and CVD risks, as well as the gut microbial genes responsible for the transformation of γBB to TMA, are unclear. In the present study, we show that plasma γBB levels in individuals from a clinical cohort (n = 2,918) are strongly associated with incident CVD event risks. Culture of human faecal samples and microbial transplantation studies in gnotobiotic mice with defined synthetic communities showed that the introduction of Emergencia timonensis, a human gut microbe that can metabolize γBB into TMA, is sufficient to complete the carnitine → γBB → TMA transformation, elevate TMAO levels and enhance thrombosis potential in recipients after arterial injury. RNA-sequencing analyses of E. timonensis identified a six-gene cluster, herein named the γBB utilization (gbu) gene cluster, which is upregulated in response to γBB. Combinatorial cloning and functional studies identified four genes (gbuA, gbuB, gbuC and gbuE) that are necessary and sufficient to recapitulate the conversion of γBB to TMA when coexpressed in Escherichia coli. Finally, reanalysis of samples (n = 113) from a clinical, randomized diet, intervention study showed that the abundance of faecal gbuA correlates with plasma TMAO and a red meat-rich diet. Our findings reveal a microbial gene cluster that is critical to dietary carnitine → γBB → TMA → TMAO transformation in hosts and contributes to CVD risk.