Gilroy served in the British Army during the First World War with the Black Watch, being commissioned as a temporary second lieutenant in August 1914, with promotion to temporary lieutenant in February 1915.