Thompson was born at 3 Brandon Street in Edinburgh to Fanny Gamgee (sister of Joseph Gamgee) and D'Arcy Wentworth Thompson (1829–1902), Classics Master at Edinburgh Academy and later Professor of Greek at Queen's College, Galway. His mother, Fanny Gamgee (1840–1860) died 9 days after his birth as a result of complications and he was brought up by his maternal grandfather Joseph Gamgee (1801–1895), a veterinary surgeon. He lived with his grandfather and uncle, John Gamgee, at 12 Castle Terrace, facing north onto Edinburgh Castle. He was also nephew to Sampson Gamgee.