While genome-wide association studies are increasingly successful in discovering genomic loci associated with complex human traits and disorders, the biological interpretation of these findings remains challenging. Here we developed the GSA-MiXeR analytical tool for gene set analysis (GSA), which fits a model for the heritability of individual genes, accounting for linkage disequilibrium across variants and allowing the quantification of partitioned heritability and fold enrichment for small gene sets. We validated the method using extensive simulations and sensitivity analyses. When applied to a diverse selection of complex traits and disorders, including schizophrenia, GSA-MiXeR prioritizes gene sets with greater biological specificity compared to standard GSA approaches, implicating voltage-gated calcium channel function and dopaminergic signaling for schizophrenia. Such biologically relevant gene sets, often with fewer than ten genes, are more likely to provide insights into the pathobiology of complex diseases and highlight potential drug targets.