The town has been founded during theEarly Middle Ages by theLongobards, as a small village defended by a fortified enclosure. This area is calledCastle of Ghedi, in which arose the ancient Early Christian church, some small shacks and, since theHigh Middle Ages, thetown hall. During the 14th century, the construction of structures outside the walls began and were formed foursuburbs:Bazzina,Gazzolo,Borgonuovo andMalborgo.
Due to the development of increasingly powerful weapons, during the 16th century, Ghedi and its castle lost their strategic importance, and the town began to decline. During the 18th century,Palazzo Orsini, in state of decay, collapsed; its access portal was bought by theVictoria and Albert Museum ofLondon, where it is still located. In the same century, the Niccolò Orsini's funeral monument was bought bySanta Giulia Museum, where it is still located.
During the 20th century, Ghedi experienced economic growth, favored by construction of theTrain Station (1893) and of theGhedi Air Base (1909). In this period, theCotonificio del Mella cotton mill opened with around 500 workers and became the largest factory in the town.[7]