When Italy entered World War II, Gasparri was serving as the head of the artillery service in the Naval Arms and Armaments Inspectorate, a role that he kept after his promotion to rear admiral in July 1941.[1][2] He was then given command of the Fleet Destroyer Group, and in this role he participated in a number of escort missions (escorting both supply convoys to North Africa and capital ships), receiving another Silver Medal of Military Valor.[1][2]
On 3 January 1943 he was promoted to vice admiral.[1][2] On 28 March 1943 Gasparri was in Naples for an inspection when the motorship Caterina Costa, moored in the harbour and laden with fuel and ammunition, caught fire for unclear reasons.[1] Gasparri took the initiative to distance some barges laden with ammunitions from the blazing ship, in order to avoid a worse disaster in case of an explosion, but Caterina Costa blew up while this attempt, personally directed by Gasparri, was still underway.[1][2] He was killed in the explosion along with some 600 people, whereas about 3,000 were wounded; he was posthumously awarded the Gold Medal of Military Valor.[1]