Gunn was the fourth of five children of Scottish parents, Isabella Grierson Robertson and her husband, Alexander Gunn. A one-time shepherd, Alexander Gunn ran a sheep farm of 27,000 acres in Central Otago. For secondary schooling David lived at Hook, near Waimate, with his maiden aunts on their 500 acre farm. Leaving school, he briefly followed other family members into Dalgety's (an agricultural company), working as a clerk in a branch office before deciding the work did not suit him. He went back to work on and later manage the farm at Hook. He underwent military training at Trentham Military Camp in 1918, but was too late to be sent to fight in the First World War.