The isolation of the bartolosides, unprecedented cyanobacterial glycolipids featuring aliphatic chains with chlorine substituents and C-glycosyl moieties, is reported. Their chlorinated dialkylresorcinol (DAR) core presented a major structural-elucidation challenge. To overcome this, we discovered the bartoloside (brt) biosynthetic gene cluster and linked it to the natural products through in vitro characterization of the DAR-forming ketosynthase and aromatase. Bioinformatic analysis also revealed a novel potential halogenase. Knowledge of the bartoloside biosynthesis constrained the DAR core structure by defining key pathway intermediates, ultimately allowing us to determine the full structures of the bartolosides. This work illustrates the power of genomics to enable the use of biosynthetic information for structure elucidation.