Departing for shakedown training soon after commissioning, Gleaves operated off the Atlantic coast and in Caribbean waters until returning to Boston on 19 March 1941 to prepare for convoy duty. She departed Newport on her first voyage on 23 June 1941, and saw her convoy arrive safely at Iceland. After patrolling in Icelandic waters for a time, she returned to Boston on 23 July.
Subsequently, Gleaves made four other convoy voyages to Iceland, Ireland and North Africa protecting the vital flow of supplies to the European theater. As the pace of German submarine attacks increased, she made more and more attacks on U-boats but recorded no confirmed kills. On 11–12 May 1942, despite the efforts of Gleaves and the other escort vessels, seven ships of the convoy were lost in two separate attacks by a large wolfpack.
After returning to Boston on 31 March 1942, Gleaves departed on 10 May for participation in the Allied landings in Sicily. After engaging in support and convoy operations in the battle zone, Gleaves and Plunkett accepted the surrender of the Italian garrison on the island of Utica on 5 August 1943, and later landed occupation troops on the island. She also drove off a group of five enemy E-boats attempting to attack shipping in the harbor of Palermo, Sicily.
As Allied preparations for the invasion of Italy reached a climax, Gleaves bombarded the Italian mainland. In September 1943 she helped clear the way for the Salerno landing forces. Following the assault, Gleaves convoyed shipping in the Mediterranean area in support of the drive north from Salerno.
When German air and land forces combined in a determined attempt to stop the landings at Anzio in January 1944, Gleaves was again on hand to lend decisive gunfire support and antiaircraft cover. In May of that year she attempted to search out and destroy German submarine U-616 but other ships of the group sank the U-boat. Gleaves picked up survivors from the sunken U-boat on 17 May.
Gleaves next took part in the invasion of southern France in August 1944. She escorted the Rangers in their initial landings, bombarded shore installations in support of the main assault and screened heavier units of the fleet off shore.
Sent to San Remo on patrol and support duty, Gleaves helped in the bombardment of shore installations there on 1 October firing on shipping in the harbor of Oneglia, Italy, with hits on two cargo ships. On the night of 1–2 October, Gleaves was attacked and succeeded in destroying one of three small explosives-laden German motor boats moving down the coast to San Remo. The other two were temporarily driven off. Returning to her station off San Remo, Gleaves was attacked two more times before she, by violent maneuvering, depth charges, and well-placed gunfire, left five boats sunk in her wake. The following morning she returned to the area to find a sixth boat disabled; and captured it with two operators on board, who provided the Allies much valuable information.
In December 1944, Gleaves was assigned as fire support ship near Allied positions on the Franco-Italian frontier, and ably performed this duty until sailing for the United States in February 1945. After a period of outfitting at New York and training activities in the Caribbean, she departed on 30 June 1945 from Guantánamo Bay, Cuba, for the Pacific, arriving at Pearl Harbor on 4 August. After the war’s end, Gleaves proceeded westward to Saipan and Nagasaki, Japan, with the occupation forces. She distinguished herself for outstanding rescue and salvage work during the powerful typhoon which swept through the Philippine Sea during September and October.
While repairing her machinery at Adak, Alaska on 23 November, Gleaves received word that steamer Adabelle Lykes in the Pacific was suffering from a smallpox epidemic. The veteran “can do” destroyer put to sea at top speed from Adak on 25 November with vital vaccine. She met the stricken steamer next day and transferred the life-saving supplies.
Her duty in the North Pacific terminated, Gleaves transported 300 veterans from the Aleutians to Seattle, Washington on “Magic-Carpet” duty, arriving on 10 December 1945. She then moved to San Francisco and on 2 January 1946 departed for Charleston, South Carolina. At Charleston, where she arrived on 18 January 1946, Gleaves decommissioned on 8 May 1946, and was placed in reserve at Philadelphia, Pennsylvania. She was later moved to the Reserve Fleet at Orange, Texas. Gleaves was stricken from the naval register on 1 November 1969 and sold 29 June 1972 and broken up for scrap.
Gleaves earned five battle stars for World War II service.