Anxiety and gambling problems co-occur at high rates. Social learning theory (SLT) suggests that people high in anxiety engage in excessive gambling to reduce negative affect. Because anxiety sensitivity (AS) is a vulnerability factor associated with addictive behaviors, it is important to identify mediators in this high-risk pathway. Emerging research shows that social context mediates associations between anxiety vulnerability and addictive behaviors. This literature shows that anxiety-prone people are at increased risk for substance problems because they engage in frequent solitary substance use. Theory would predict a similar pathway to gambling problems, but this remains to be tested. Accordingly, this study aimed to examine solitary gambling as an explanatory variable in the anxiety pathway to gambling problems. We used a longitudinal ecological momentary assessment (EMA) design. After completing baseline measures, young adults (N = 108) were asked to report daily on their gambling behavior over a 30-day period. Bias corrected bootstrapped confidence intervals (CI) supported 1 hypothesized indirect effect from baseline AS (Time 1) to EMA time spent gambling (Time 2) via EMA solitary gambling (Time 2; B = 0.019, 95% CI [0.002, 0.045]). This suggests that emerging adults with high levels of AS at baseline engaged in frequent solitary gambling over the 30-day EMA sampling period, which in turn predicted more time spent gambling over this same time period. Our results show that solitary gambling mediates the relation between anxiety vulnerability and excessive gambling. Understanding how social context relates to excessive gambling can help create interventions to reduce solitary gambling among anxiety-prone individuals.