It is well appreciated that oxygen- and nutrient-limiting gradients characterize microenvironments within chronic infections that foster bacterial tolerance to treatment and the immune response. However, determining how bacteria respond to these microenvironments has been limited by a lack of tools to study bacterial functions at the relevant spatial scales in situ. Here we report the application of the hybridization chain reaction (HCR) v3.0 to Pseudomonas aeruginosa aggregates as a step towards this end. As proof-of-principle, we visualize the expression of genes needed for the production of alginate (algD) and the dissimilatory nitrate reductase (narG). Using an inducible bacterial gene expression construct to calibrate the HCR signal, we were able to quantify algD and narG gene expression across microenvironmental gradients both within single aggregates and within aggregate populations using the Agar Block Biofilm Assay (ABBA). For the ABBA population, alginate gene expression was restricted to hypoxic regions within the environment (~40-200 μM O2), as measured by an oxygen microelectrode. Within individual biofilm aggregates, cells proximal to the surface expressed alginate genes to a greater extent than interior cells. Lastly, mucoid biofilms consumed more oxygen than nonmucoid biofilms. These results establish that HCR has a sensitive dynamic range and can be used to resolve subtle differences in gene expression at spatial scales relevant to microbial assemblages. Because HCR v3.0 can be performed on diverse cell types, this methodological advance has the potential to enable quantitative studies of microbial gene expression in diverse contexts, including pathogen behavior in human chronic infections.ImportanceThe visualization of microbial activities in natural environments is an important goal for numerous studies in microbial ecology, be the environment a sediment, soil, or infected human tissue. Here we report the application of the hybridization chain reaction (HCR) v3.0 to measure microbial gene expression in situ at single-cell resolution in aggregate biofilms. Using Pseudomonas aeruginosa with a tunable gene expression system, we show that this methodology is quantitative. Leveraging HCR v3.0 to measure gene expression within a P. aeruginosa aggregate, we find that bacteria just below the aggregate surface are the primary cells expressing genes that protect the population against antibiotics and the immune system. This observation suggests that therapies targeting bacteria growing with small amounts of oxygen may be most effective against these hard-to-treat infections. More generally, HCR v3.0 has potential for broad application into microbial activities in situ at small spatial scales.