He attended schools in Dubuque County, Iowa and Jackson County, Iowa. He attended the University of Minnesota, graduating as valedictorian in 1885.
Gray"s family emigrated to the United States in 1866, settling in Iowa. After working as a teacher for a year, Gray moved to Minneapolis in 1880. After graduating, he began working with the Minneapolis Tribune as a reporter.
When the Minneapolis Times was founded in 1889, he moved there to work as an editors
He was later promoted to managing editor and also served as a special correspondent in Washington, District of Columbia during the run up to the Spanish–American War. He ran for re-election in 1900 but was defeated by A. A. Ames.
After leaving politics he became an editor with the Minneapolis Journal. Gray died on September 8, 1916.
He is buried in Lakewood Cemetery in Minneapolis.
Minneapolis Mayoral Election, 1898
James Gray 16,066
Edward East. Webster 9,494
Albert Alonzo Ames 5,266
William J. Dean 923
Frank A. Malmquist 599
Minneapolis Mayoral Election, 1900
Albert Alonzo Ames 17,292
James Gray 12,732
William J. Dean 9,140
Ole B. Olson 227
Asa Kingsbury 217.
Married Grace Orpha Farrington, October 25, 1893.