Elevated intraocular pressure (IOP) is a major risk factor for glaucoma, a leading cause of blindness. IOP heritability has been estimated to up to 67%, and to date only 11 IOP loci have been reported, accounting for 1.5% of IOP variability. Here, we conduct a genome-wide association study of IOP in 69,756 untreated individuals of European, Latino, Asian, and African ancestry. Multiple longitudinal IOP measurements were collected through electronic health records and, in total, 356,987 measurements were included. We identify 47 genome-wide significant IOP-associated loci (P < 5 × 10-8); of the 40 novel loci, 14 replicate at Bonferroni significance in an external genome-wide association study analysis of 37,930 individuals of European and Asian descent. We further examine their effect on the risk of glaucoma within our discovery sample. Using longitudinal IOP measurements from electronic health records improves our power to identify new variants, which together explain 3.7% of IOP variation.