In August 1917, Gatley was promoted to brigadier general as commander of the 55th Field Artillery Brigade, a unit of the 30th Division. He subsequently transferred to command of the 67th Field Artillery Brigade of the 42nd Division, which he led until the end of the war. He took part in the Champagne-Marne, Aisne-Marne, St. Mihiel, and Meuse-Argonne battles and offensives. From December 1917 to January 1918, Gatley commanded the 30th Division. In 1919 he commanded the 42nd Division during part of its post-war occupation duty in Germany.