Goffstown is a town in Hillsborough County, New Hampshire, United States. The population was 17,651 at the 2010 census. The compact center of town, where 3,196 people resided at the 2010 census, is defined by the U.S. Census Bureau as the Goffstown census-designated place and is located at the junction of New Hampshire routes 114 and 13. Goffstown also includes the villages of Grasmere and Pinardville. The town is home to Saint Anselm College (and its New Hampshire Institute of Politics) and the New Hampshire State Prison for Women.
Prior to the arrival of English colonists, the area had been inhabited for thousands of years by succeeding cultures of Native Americans; its waterways had numerous fish and the area had game.
The town was first granted as "Narragansett No. 4" in 1734 by Colonial Governor Jonathan Belcher of Massachusetts, who then held authority over New Hampshire as well. It was one of seven townships intended for soldiers (or their heirs) who had fought in the "Narragansett War" of 1675, also known as King Philip's War. In 1735, however, some grantees "found it so poor and barren as to be altogether incapable of making settlements," and were instead granted a tract in Greenwich, Massachusetts.
The community would be called "Piscataquog Village" and "Shovestown" before being regranted by Masonian proprietor Governor Benning Wentworth in 1748 to new settlers. These included Rev. Thomas Parker of Dracut and Colonel John Goffe, for whom the town was named. He was for several years a resident of Bedford, and the first judge of probate in the county of Hillsborough. Goffstown was incorporated June 16, 1761. A large part of the town was originally covered with valuable timber. Lumbering and fishing were the main occupations of the early settlers. The village of Grasmere was named for Grasmere, England, home of the poets William Wordsworth and Samuel Taylor Coleridge.
A Congregational church was organized about October 30, 1771, and the town made annual small appropriations for preaching. The majority of residents were Congregationalists; residents in the south part were of Scots-Irish descent and were Presbyterian. A meeting-house was erected in 1768; but it was not completed for several years. The first minister was Rev. Joseph Currier, appointed in 1771; he was dismissed August 29, 1774 for intemperance, according to the town records. In 1781, the Congregationalists and the Presbyterians organized separately; the former called Rev. Cornelius Waters, who became their pastor, and continued till 1795. The next minister was Rev. David L. Morril, who began March 3, 1802. He was supported by both congregations under the name of the Congregational Presbyterian church. Morril was elected as a representative of the town to the state house, as a US Senator for the state, and in 1824, as governor of the state, serving until 1827.
The Piscataquog River, which bisects the main village of Goffstown and was spanned by a covered bridge, provided water power for industry. In 1817, Goffstown had 20 sawmills, seven grain mills, two textile mills, two carding machines, and a cotton factory. Its textile industry was an example of the economic ties between New England and the American South, which was dependent on slave labor for production of its lucrative cotton commodity crop.
The town was described in 1859 by the following:
In 1816, the Religious Union society was organized. A new meetinghouse was erected in the west village. Meetings were held two thirds of the time in the new house, and one third in the old house at the center.
In 1818-19 residents were deeply interested in the preaching of Rev. Abel Manning, as part of the Second Great Awakening. Sixty-five persons joined the church that year. Other ministers were Rev. Benjamin H. Pitman (1820 to 1825); Rev. Henry Wood (1826 to 1831); and Rev. Isaac Willey (1837 to 1853). A Baptist church was formed in 1820.
In the early part of 1841, a female commenced preaching here, and shortly more than half the voters in town came into her support. She professed no connection with any church. The excitement created by her preaching, however, soon died out, the result of it being the organization of the existing Methodist church. 
The Uncanoonuc Mountains in Goffstown once featured the Uncanoonuc Incline Railway, founded in 1903. It first carried tourists in 1907 to the summit of the south peak, on which was built that year the Uncanoonuc Hotel. The 5½ story building provided 37-38 guest rooms, and a dining room that accommodated 120. It also offered outstanding views of the surrounding valley, including Manchester, connected by electric trolley to the railway's base station. The hotel would burn in 1923, and the train was later used to transport skiers to the top. The railway peaked during the 1930s and 1940s, but was essentially abandoned by the 1950s. The summit of the south peak is now the site of numerous television and radio towers.
Grasmere Village straddles the Piscataquog River in the eastern region of Goffstown. The Hillsborough County Railroad Station was located at Grasmere on the southern side of the river. Rail-borne freight for Grasmere and other surrounding locales was delivered to this station during the late nineteenth and early twentieth centuries. Another rail station in Goffstown was located to the west closer to the town center, and a third was Parker's Station to the west of the town center.
In the mid-twentieth-century, rail service through the town ceased during widespread restructuring of railroads, which suffered due to competition with trucking. In the dawning years of the twenty-first century, town and local organizations cooperated in a rails-to-trails effort; they completed conversion of the railbeds into bicycling and walking trails.
The County Farm grounds were converted to the New Hampshire State Prison for Women (currently located at 317 Mast Road). The facility's most famous resident was the convicted murderess Pamela Smart, who was incarcerated at the Prison for Women from March 22, 1991 to March 11, 1993. She was transferred to Bedford Hills Correctional Facility in Bedford, New York.