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 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 Hailey, Idaho, in 1881. At Hailey, 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 until 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 1897 to March 1899.
Gunn later was the commandant of the Idaho Soldiers’ Home in 1901–03.
He is buried in Boise, Idaho.