Gilmer, Texas is located 35 miles northeast of Tyler in Upsher County. When the county was established in 1846, it was required that the county seat be located within five miles of the geographic center and that it be called Gilmer, for Thomas W. Gilmer, who died during the test firing of a new cannon on the USS Princeton on February 28, 1844. The same explosion also killed United States secretary of state Abel P. Upshur, for whom the county is named. During the Civil War Gilmer businesses provided hats and leather goods to the Confederate States of America. By 1890, local farmers were producing sweet potatoes. In the 1920s, sweet potato crops had to be quarantined because of an infestation of sweet-potato weevils, and was not lifted until 1935.