Wastewater microbial communities are not static and can vary significantly across time and space, but this variation and the factors driving the observed spatiotemporal variation often remain undetermined. We used a shotgun metagenomic approach to investigate changes in wastewater microbial communities across 17 locations in a sewer network, with samples collected from each location over a 3-week period. Fecal material-derived bacteria constituted a relatively small fraction of the taxa found in the collected samples, highlighting the importance of environmental sources to the sewage microbiome. The prokaryotic communities were highly variable in composition depending on the location within the sampling network, and this spatial variation was most strongly associated with location-specific differences in sewage pH. However, we also observed substantial temporal variation in the composition of the prokaryotic communities at individual locations. This temporal variation was asynchronous across sampling locations, emphasizing the importance of independently considering both spatial and temporal variation when assessing the wastewater microbiome. The spatiotemporal patterns in viral community composition closely tracked those of the prokaryotic communities, allowing us to putatively identify the bacterial hosts of some of the dominant viruses in these systems. Finally, we found that antibiotic resistance gene profiles also exhibit a high degree of spatiotemporal variability, with most of these genes unlikely to be derived from fecal bacteria. Together, these results emphasize the dynamic nature of the wastewater microbiome, the challenges associated with studying these systems, and the utility of metagenomic approaches for building a multifaceted understanding of these microbial communities and their functional attributes.