Ecosystem reliance on subsurface waters deeper than one meter in the soil column has been well-documented in many semi-arid and arid regions around the world. In California, water stored in fractured bedrock has been shown to sustain ecosystems and mitigate mortality during drought. However, quantifying the importance of ecosystem reliance on groundwater is challenging, as below-ground structure is difficult to observe and the influence of groundwater may be subtle compared to the larger signal of soil moisture. In this study we leverage 20 years of eddy covariance flux data, along with manual and continuous water table measurements and tree growth data, to isolate the influence of inter-annual variability in groundwater levels in a semi-arid Mediterranean system in California using machine learning. We find that models better predict gross primary productivity anomalies when trained using groundwater measurements, and ecosystem carbon fixation is limited under negative groundwater anomalies at the site. Continuous water table depth, biweekly tree growth measurements, and annual tree ring data confirm our findings, suggesting that access to groundwater at the site affects total ecosystem productivity and that extreme groundwater drought limits carbon sequestration rates. With a future of increasing groundwater deficit due to both human use and climate change, our study suggests groundwater-dependent systems in semi-arid environments will experience intensified water stress, risk of embolism, and decreased rates of carbon fixation.