It appeared as early as 1086 in the Domesday Book in its present form of Grantham, but was also recorded variously as Grandham, Granham and Graham.
The place name element grand could possibly mean "gravel".
The name of the town is the origin of the Scottish surname, now often used as a given name, Graham.
The Nottingham Line (LNER) arrived first in 1850, then the London line (GNR) – the Towns Line from Peterborough to Retford – arrived in 1852. Little Gonerby and Spittlegate were added to the borough in 1879.
The Boston, Sleaford and Midland Counties Railway arrived in 1857. The town had been in the wapentake of Loveden, and the town included three townships of Manthorpe with Little Gonerby, Harrowby, and Spittlegate with Houghton and Walton.
Mesolithic flints have also been recovered from the Cherry Orchard Estate as well as from sites to the west of Great Gonerby To the north-east of the town centre a Bronze Age bucket and urn cemetery, with cremation burials and ploughed-out barrows, has been recorded.
Bronze Age flint scatters have also been found in several places, particularly on the higher ground near Barrowby.
Richard Hornsby and Richard Seaman founded Seaman & Hornsby, Iron Founders and Millwrights, at Spittlegate in Grantham in 1810.
The company was renamed Richard Hornsby (1790–1864) & Sons when Seaman retired in 1828. From 1840 until 1906 the company built steam engines.
In December 1914 Miss Damer Dawson, the Chief of the Corps, came to Grantham to supervise the preliminary work of the women police.
The officers stationed at Grantham were Miss Allen and Miss Harburn.
The street name "Castlegate" cannot be traced further back than the 17th century.
The town developed when the railway came to the town.
At Saltersford a Bronze Age ingot and a rapier were found.