Capturing the heterogeneous phenotypes of microbial populations at relevant spatiotemporal scales is highly challenging. Here, we present par-seqFISH (parallel sequential fluorescence in situ hybridization), a transcriptome-imaging approach that records gene expression and spatial context within microscale assemblies at a single-cell and molecule resolution. We applied this approach to the opportunistic pathogen Pseudomonas aeruginosa, analyzing about 600,000 individuals across dozens of conditions in planktonic and biofilm cultures. We identified numerous metabolic- and virulence-related transcriptional states that emerged dynamically during planktonic growth, as well as highly spatially resolved metabolic heterogeneity in sessile populations. Our data reveal that distinct physiological states can coexist within the same biofilm just several micrometers away, underscoring the importance of the microenvironment. Our results illustrate the complex dynamics of microbial populations and present a new way of studying them at high resolution.