How diversity evolves and persists in biofilms is essential for understanding much of microbial life, including the uncertain dynamics of chronic infections. We developed a biofilm model enabling long-term selection for daily adherence to and dispersal from a plastic bead in a test tube. Focusing on a pathogen of the cystic fibrosis lung, Burkholderia cenocepacia, we sequenced clones and metagenomes to unravel the mutations and evolutionary forces responsible for adaptation and diversification of a single biofilm community during 1,050 generations of selection. The mutational patterns revealed recurrent evolution of biofilm specialists from generalist types and multiple adaptive alleles at relatively few loci. Fitness assays also demonstrated strong interference competition among contending mutants that preserved genetic diversity. Metagenomes from five other independently evolved biofilm lineages revealed extraordinary mutational parallelism that outlined common routes of adaptation, a subset of which was found, surprisingly, in a planktonic population. These mutations in turn were surprisingly well represented among mutations that evolved in cystic fibrosis isolates of both Burkholderia and Pseudomonas. These convergent pathways included altered metabolism of cyclic diguanosine monophosphate, polysaccharide production, tricarboxylic acid cycle enzymes, global transcription, and iron scavenging. Evolution in chronic infections therefore may be driven by mutations in relatively few pathways also favored during laboratory selection, creating hope that experimental evolution may illuminate the ecology and selective dynamics of chronic infections and improve treatment strategies.