Genome-wide association studies (GWAS) have cataloged many significant associations between genetic variants and complex traits. However, most of these findings are limited conclusive, because they often have small effects and occur in non-coding regions. Integration of GWAS with gene regulatory networks helps address both issues by aggregating weak genetic signals within regulatory programs. Here we develop a Bayesian framework that integrates GWAS summary statistics with regulatory networks to infer enrichments and associations simultaneously. Our method improves upon existing approaches by explicitly modeling network topology to assess enrichments, and by automatically leveraging enrichments to identify associations. Applying this method to 18 human traits and 38 regulatory networks shows that genetic signals of complex traits are often enriched in networks specific to trait-relevant cell types or tissues. Prioritizing variants within enriched networks identifies known and new trait-associated genes driving novel biological and therapeutic insights.