Dr. Gray was born in Centre County, Pennsylvania. He was educated at Dickinson College and graduated from the University of Pennsylvania Medical School in 1849. He took service at the Blockley Hospital in Philadelphia for a short time but moved to the Utica (N.Y.) Asylum in 1850 as a third assistant physician. Promoted quickly to second and first assistant positions, he was appointed superintendent in 1854 and retained that position until his death.
In 1855, Dr. Gray became editor of the American Journal of Insanity, which was owned by the Utica Asylum. This was the first and, for many years, the only American journal devoted to insanity and allied subjects. He remained editor for 32 years, a post that gave him a ready avenue for his prolific writings.
Dr. Gray was a strong and vocal proponent of the theory that mental disease was due to physical causes in the brain. Utica was the first mental hospital to employ a pathologist and to open a pathological laboratory. Dr. Gray advocated for and practiced good care and comfort for his patients. He limited the use of seclusion and restraint and was among the first to use steam heating in patient’s buildings. He was considered an expert in forensic cases, and his testimony was often sought by courts. He was the chief witness for the prosecution in the trial of the assassin Charles Guiteau, who shot U.S. President Garfield in 1881.
Dr. Gray occupied the Chair of Psychological Medicine and Medical Jurisprudence at Bellevue Hospital and Albany Medical Colleges. He served as President of the New York State Medical Society, received an honorary degree from Hamilton College (N.Y.), and was an honorary member of the psychological societies of Great Britain, France, and Italy. Dr. Gray was President of the Association of Medical Superintendents of American Institutions for the Insane (1883–1884).