Upon the outbreak of the First World War, Gater enlisted as a second lieutenant in the Sherwood Foresters, his local regiment. and promoted to lieutenant in October. He was promoted to captain in 1915, before being deployed to Gallipoli with the 9th battalion of his regiment, part of the 33rd Brigade of the 11th Division. He was promoted to major whilst serving in the Gallipoli Campaign. His unit was evacuated from the Mediterranean in December 1915, being redeployed to the Western Front in 1916. He was awarded the Distinguished Service Order in October 1916 during the Battle of the Somme. That same month he was promoted to the rank of lieutenant colonel and given command of the 6th Battalion, Lincolnshire Regiment. Whilst commanding the battalion at Messines, he sustained a wound in the mouth and ear by a shell splinter but remained on duty, and for this he was awarded a bar to his DSO. On 1 November 1917, Gater was chosen as commander of the 62nd Brigadeafter the death of Brigadier General Cecil Rawling. This appointment was unprecedented, as Gater had only served in the army for three years. He led the brigade during the German Spring Offensive of 1918, refusing to surrender his position despite its encirclement by German forces. He was wounded twice, mentioned in dispatches four times, awarded a DSO in June 1916 when a temporary major and a bar in September 1917 when temporary lieutenant colonel, made a commander of the Légion d'honneur, awarded the French Croix de Guerre in November 1918, and made a Companion of the Order of St Michael and St George in January 1919. All of his promotions were temporary, but he was given the honorary rank of brigadier general in 1919.
Late life
Following the war, Gater became a civil servant. He was Director of Education in Lancashire between 1919 and 1924, in charge of 4,000 teachers and 118,000 children in the Lancashire school system. He moved to London in 1924, succeeding Robert Blair as the second Director of Education at London County Council until 1933, with 480,000 children in its schools. He spent much time reorganising and rebuilding the school system in London after the Geddes Axe of 1921. He advocated the development of Bloomsbury for the University of London. In 1933 he succeeded Sir Montagu Cox as Clerk to London County Council. He was knighted in 1936. In July 1939, he became Joint Secretary at the Ministry of Home Security and subsequently served as Permanent Under-Secretary of State for the Colonies from February 1940, but then transferred to the Ministry of Supply in May 1940, and then back to the Ministry of Home Security in October 1940, finally returning to the Colonial Office in April 1942. In later parts of the war he was involved in secret deliberations of the British government regarding possible postwar solutions to the question of Palestine and had contacts with the Zionist leader Chaim Weitzman. He was made a Knight Commander of the Order of the Bath in June 1941, and a Knight Grand Cross of the Order of St Michael and St George in January 1944. He became a Fellow at Winchester College in 1936, and he was Warden of Winchester College from 1951 to 1959. In addition, he was a Justice of the Peace. He married Irene in 1926. She was the daughter of John Bowyer Buchanan Nichols; one of her brothers was the poet Robert Malise Bowyer Nichols. They had one son. He lived near Oxford in retirement.