In the later Middle Ages it was held by the Canossa family as part of the Holy Roman Empire, and then it established itself as a free commune. In the 15th century Goito was contended between the Visconti and Gonzaga families, until, after a battle fought on 14 June 1453, it became a possession of marquis Ludovico III Gonzaga. He built here a residence (in which the painter Andrea Mantegna worked in 1463–64), restored the fortifications and built the Naviglio di Goito canal, and died here by plague in 1478.