Fremont cottonwood (Populus fremonti) is a foundation riparian tree species that drives community structure and ecosystem processes in southwestern U.S. ecosystems. Despite its ecological importance, little is known about the ecological and environmental processes that shape its genetic diversity, structure, and landscape connectivity. Here, we combined molecular analyses of 82 populations including 1312 individual trees dispersed over the species' geographical distribution. We reduced the data set to 40 populations and 743 individuals to eliminate admixture with a sibling species, and used multivariate restricted optimization and reciprocal causal modeling to evaluate the effects of river network connectivity and climatic gradients on gene flow. Our results confirmed the following: First, gene flow of Fremont cottonwood is jointly controlled by the connectivity of the river network and gradients of seasonal precipitation. Second, gene flow is facilitated by mid-sized to large rivers, and is resisted by small streams and terrestrial uplands, with resistance to gene flow decreasing with river size. Third, genetic differentiation increases with cumulative differences in winter and spring precipitation. Our results suggest that ongoing fragmentation of riparian habitats will lead to a loss of landscape-level genetic connectivity, leading to increased inbreeding and the concomitant loss of genetic diversity in a foundation species. These genetic effects will cascade to a much larger community of organisms, some of which are threatened and endangered.