In 1881,
President Chester A. Arthur nominated Gray to a vacancy on the
Supreme Court of the United States; he was confirmed the following day. In 1889, Gray married Jane Matthews, who was the widow of his former colleague on the court,
Thomas Stanley Matthews. As he had been in Massachusetts, Gray was the first Justice of the U.S. Supreme Court to hire a law clerk. He used his own funds to pay the clerk's salary, as no government money was appropriated for this purpose at the time.
Gray served on the U.S. Supreme Court for 24 years, resigning in July, 1902, gravely ill. He was succeeded by a fellow Massachusetts native,
Oliver Wendell Holmes, Jr., who coincidentally had succeeded Gray on the Massachusetts Supreme Judicial Court.
Gray was one of the few Supreme Court appointees in the latter half of the
1800s who had not previously been a politician, and he maintained the opinion that law and politics were entirely separate fields. His opinions, both concurring and dissenting, were generally very long and weighted with legal history.
Gray is best known for his decision in
Pollock v. Farmers' Loan & Trust Co. This case was heard twice, though only the second hearing resulted in a decision; the justices wished to rehear the case feeling that the opinions written had not adequately explained their view of the situation (the case was about the constitutionality of a national income tax). After the first hearing, Gray wrote that he sided with the defendant (Farmer's Loan & Trust), arguing that the tax was indeed constitutional. He was in the minority, however. After the second hearing, Gray changed his stance, joining with the majority in favor of the plaintiff. He chose not to write a dissenting or concurring opinion, in either hearing.
Horace Gray was also the author of the 1898 case
United States v. Wong Kim Ark, ruling that a child born in United States to foreign parents is automatically a citizen of the United States.
Gray was the half-brother of
John Chipman Gray, a lawyer and long-time professor at
Harvard Law School.