In 1862 Gunn enlisted in the 27th Wisconsin Infantry, and served with them for the remainder of the war. By the time he was discharged in October of 1865 he was a Captain. He briefly studied law, but never practiced, and in 1866 he headed west.
In the west he followed opportunity, and lived for a while in Gilpin County and Georgetown, Colorado. He also worked in Virginia City, Nevada and in California before settling in Haily, Idaho in 1881. At Haily, he went into the newspaper business, publishing the Wood River Valley Sentinel.
Gunn became a member of the Populist Party, and stood for office several times. When Idaho became a state in 1890, Gunn was elected to the state Senate. He also served as editor of the Boise Sentinel untill elected to Congress. He ran for congress four times; in 1892, 1894, 1896, and 1898, but only his 1896 race was successful. He was elected to the U. S. House of Representatives in 1896 representing the entire state. He served only one term, from March of 1897 to March of 1899.