While the relationship context itself is increasingly being examined to understand sexual risk behavior among gay male couples, few studies have examined relationship dynamics and HIV risk longitudinally. We aimed to investigate relationship dynamics and psychosocial predictors of unprotected anal intercourse (UAI) with outside partners of serodiscordant or unknown HIV serostatus (UAIOUT) over time as well as UAI with primary partner in serodiscordant couples (UAIPP). We recruited a sample of 566 ethnically diverse, seroconcordant and serodiscordant couples and interviewed them six times over the course of 3 years. The surveys encompassed relationship dynamics between the partners and sexual behavior with primary and outside partners. We fit generalized linear mixed models for both the UAI outcomes with time and relationship dynamics as predictors while controlling for relationship length. Analyses of the longitudinal data revealed that, in both categories of couples, those with higher levels of positive relationship dynamics (e.g., commitment, satisfaction) were less likely to engage in UAIOUT. Higher investment in sexual agreement and communication were among the factors that significantly predicted less UAIOUT for seroconcordant couples, but not for the serodiscordant couples. For serodiscordant couples, greater levels of attachment and intimacy were associated with greater odds of UAIPP while increased HIV-specific social support was associated with lower odds of UAIPP. These results underscore the importance of creating and tailoring interventions for gay couples that help maintain and strengthen positive relationship dynamics as they have the potential to produce significant changes in HIV risk behavior and thereby in HIV transmission.