Gilman was born in 1833 in Gilmanton, New Hampshire, to Charles Gilman and Eliza Gilman (née Page). The Gilman family was a well established one in New England, with roots dating back to the 1630s. He attended school at Gilmanton Academy and later in East Andover, New Hampshire. After a brief career teaching in several different New Hampshire towns, he relocated to Sauk Rapids, Minnesota, in 1855.[1]
Gilman quickly became involved in local politics and became register of deeds and county auditor for Benton County, Minnesota. On January 1, 1857, he married Hester Cronk, a native of Belleville, Ontario. In 1861 he was named the head of the United States General Land Office in St. Cloud, Minnesota, and relocated there. He was later reappointed to the same office in 1866 and again in 1869. During this time Gilman also explored the timber and mining industries, pursuing interests in Minnesota as well as Ontario and further west.[1]
In 1867 Gilman was elected to the Minnesota Senate, serving until 1871. He was later elected to the Minnesota House in 1875 and served until 1880 (including as Speaker of the Minnesota House from 1878 to 1879). During both terms, Gilman was heavily involved in legislation surrounding railroads and supported the development of the Great Northern Railway (U.S.). He also won election as a Republican despite his district leaning heavily Democratic.[1][2]