The local arrangement of microbes can profoundly impact community assembly, function, and stability. To date, little is known about the spatial organization of the human gut microbiome. Here, we describe a high-throughput and streamlined method, dubbed SAMPL-seq, that samples microbial composition of micron-scale sub-communities with split-and-pool barcoding to capture spatial colocalization in a complex consortium. SAMPL-seq analysis of the gut microbiome of healthy humans identified bacterial taxa pairs that consistently co-occurred both over time and across multiple individuals. These colocalized microbes organize into spatially distinct groups or "spatial hubs" dominated by Bacteroideceae, Ruminococceae, and Lachnospiraceae families. From a dietary perturbation using inulin, we observed reversible spatial rearrangement of the gut microbiome, where specific taxa form new local partnerships. Spatial metagenomics using SAMPL-seq can unlock new insights to improve the study of microbial communities.