After the outbreak of the Spanish Civil War, he enlisted in the Corps of Volunteer Troops and fought the on the Francoist side from 22 December 1936 to 10 March 1939, when he married Moras Maria del Pilar, four years younger than him.
After returning from Spain he embarked on a political career, being appointed in 1939 as Secretary of the Nuoro section of the National Fascist Party.
He was then employed by the Ministry of Foreign Affairs of the Italian Social Republic and served as prefect of Milan from 23 June 1944 to 2 April 1945, when he was appointed as Mussolini's private secretary at the proposal of Nicola Bombacci, of whom Gatti was a trusted collaborator.
During the twilight of the Italian Social Republic, he was tasked by Mussolini, together with Bombacci, with carrying out a "counter-investigation" into the murder of Giacomo Matteotti, aimed at showing he had not been involved at all in the crime.
After sheltering his wife and three children in a convent in Milan, Gatti followed Mussolini to Menaggio, where at dawn on 27 April 1945 he was taken prisoner by the partisans; a few hours later he was taken to Dongo and shot along with other Fascist leaders and officials.