W. Gary Ernst (born December 14, 1931) is an American geologist specializing in petrology and geochemistry. He currently is the Benjamin M. Page Professor Emeritus in Stanford University's Department of Geological Sciences. Ernst was born in St. Louis, Missouri. He received a B.A. degree in Geology from Carleton College in 1953, an M.S. in Geology from the University of Minnesota of 1955, and a Ph.D. in Geochemistry from Johns Hopkins University in 1959.