Gresham received a recess appointment from President Ulysses S. Grant on September 1, 1869, to a seat on the United States District Court for the District of Indiana vacated by Judge David McDonald. He was nominated to the same position by President Grant on December 6, 1869, was confirmed by the United States Senate on December 21, 1869, and received his commission on December 21, 1869. His service terminated on April 9, 1883 due to his resignation.
Cabinet offices
In April 1883, Gresham succeeded Timothy O. Howe as Postmaster General of the United States in President Chester A. Arthur's cabinet, taking an active part in the suppression of the Louisiana Lottery, and in September 1884, he succeeded Charles J. Folger as United States Secretary of the Treasury. In the following month he resigned to accept a federal judicial post.
Court of Appeals/Circuit Court service
Gresham received a recess appointment from President Chester A. Arthur on October 28, 1884, to a seat on the United States Circuit Courts for the Seventh Circuit vacated by Judge Thomas Drummond. He was nominated to the same position by President Arthur on December 3, 1884, was confirmed by the United States Senate on December 9, 1884, and received his commission the same day. Gresham was assigned by operation of law to additional and concurrent service on the United States Court of Appeals for the Seventh Circuit on June 16, 1891, to a new seat authorized by 26 Stat. 826. His service terminated on March 3, 1893, due to his resignation.
Gresham was a candidate for the Republican presidential nomination in 1884 and 1888, in the latter year leading for some time in the balloting. His 1888 candidacy was supported by several notable agrarian unions, including The Agricultural Wheel, Grange and Farmer's Alliance. Gradually, however, he grew out of sympathy with the Republican leaders and policy, and in 1892 advocated the election of the Democratic candidate, Grover Cleveland, for the presidency. Gresham was United States Secretary of State in President Grover Cleveland's cabinet from 1893 to 1895. He died on May 28, 1895, in Washington, D.C. He is interred in Arlington National Cemetery.
Family
Gresham was born to William Gresham and his wife Sarah Davis. William had been elected a Colonel in the militia of Indiana, was a member of the Whig Party, and was elected Sheriff of Harrison County, Indiana. On January 26, 1834, William was fatally stabbed while assisting in the arrest of Levi Sipes, a so-called "desperado". Walter's paternal grandparents were George Gresham and Mary Pennington. George was born in Virginia but later settled in Kentucky. He moved to Indiana in 1809. Mary was the only sister of Dennis Pennington, speaker of the first Indiana Senate. George Gresham was a son of Lawrence Gresham. Lawrence was born in England but moved to the Colony of Virginia in 1759. He initially served as an indentured servant of an uncle. He was released from service upon reaching adulthood and later served in the Continental Army. He married Sarah O'Neal. Lawrence followed his son to Kentucky and Indiana well into his old age.