Founded in a region inhabited from the Bronze Age, Castel Goffredo belonged to the count-bishops of Brescia from the ninth century to 1115, when the commune was established. When Brescia proved unable to come to the commune's defense, in 1337 it placed itself under the protection of Mantua and the Gonzaga. From 1348 to 1404 it was governed from Milan by the Visconti and returned to the Gonzaga in 1441.
Castel Goffredo became the seat of an autonomous feudo of marquis Aloysio Gonzaga in 1511. At his death, his fiefs of Castel Goffredo, Castiglione delle Stiviere and Solferino were divided among his three sons. The eldest, Alfonso, who gained Castel Goffredo, was assassinated in 1592 by members of the household of his nephew Rodolfo Gonzaga of Castiglione, brother of the saintly Aloysius Gonzaga; Alfonso, publicly tried for murder but acquitted, was murdered in turn, 31 January 1593, occasioning a popular uprising that re-established the Magnifica Comunità. The territory was annexed in 1603 by the duchy of Milan following a bitter suit heard before the Emperor, and remained Milanese territory until 1707.
In 1707, the Austrians took over the region and the Habsburgs then ruled the area until 1859, save only for a decade or so of French rule during the time of Napoleonic Wars.
After the Battle of Solferino, the town was briefly part of the Kingdom of Piedmont-Sardinia, until that kingdom itself developed, in 1861, into the united Kingdom of Italy.
The town of Castel Goffredo has been involved in textile production since medieval times. The original source material was wool, but in the 1700s, the leading family of the town, the Acerbi, introduced silk-worm farming and silk-production became an important sector. Cotton weaving was also introduced around this time. The production of cotton and silk was revolutionised by the industrial processes of the twentieth century, which also saw the introduction of the new synthetics into the business.
During the 20th century, the area underwent a period of sustained and steady economic development and growth. In 2002, Castel Goffredo was recognised as a titular 'città', though it remains a comune and not a city in the general sense.
The first modern textile-factory was built in 1925 and others soon followed. They took great advantage of the post-war boom and began to specialise, in particular, in the manufacture of hosiery. The area is now a centre of expertise in the production of socks and of lingerie:
[3]
^"Together, the businesses of Castel Goffredo and its neighboring towns produce 70 percent of all women's hosiery sold in Italy and 40 percent of all hosiery sold throughout Europe", Stuart A. Rosenfeld, Competitive manufacturing: new strategies for regional development, 1992: