Competitive gene-set analysis, also called enrichment analysis, is a widely used tool for functional interpretation of high throughput biological data such as gene expression data. It aims at testing a known category (e.g. a pathway) of genes for enriched differential expression (DE) signals compared to genes not in the category. Most enrichment testing methods ignore the widespread correlations among genes, which has been shown to result in excessive false positives. We show, both theoretically and empirically, that existing methods to account for correlations, such as GSEA and CAMERA, can result in severely mis-calibrated tests and/or substantial power loss. We propose MEACA, a new gene-set testing framework based on a mixed effects model. Compared to existing methods, MEACA enjoys robust type 1 error control in widely ranging scenarios and improves power. Applications of MEACA to a Huntington’s disease study and a lymphoblastoid cell line data set demonstrate its ability to recover biologically meaningful relationships.