Captain Gainard was born in Chelsea, Massachusetts, on 11 October 1889. He enlisted in the US Naval Reserve Forces as Quartermaster Third Class, on 23 November 1917, at New York, New York, and was commissioned Ensign on 23 March 1918.
He was called to active duty late in March 1918, and joined the Naval transport, USS President Lincoln. He was aboard that vessel when she was sunk by the German submarine U-90, off the Isle of Sicily, on 31 May 1918. The President Lincoln was returning to the United States from Europe with seven hundred and fifteen persons (passengers and ship's company) on board. Her loss was three of her officers and twenty-three of her crew. This small loss of life was credited to the thorough discipline of the ship's company and the excellent seamanship of her commanding officer.
From 4 September until 9 October 1918, Captain Gainard was on duty at Cardiff, Wales, in connection with Army coal trade vessels. On 12 October 1918, he joined the Naval transport, USS Charles, operating in the English Channel transporting troops to France and returning casualties, and served during the remainder of the world war in her. During the war he received a temporary promotion to Lieutenant (junior grade) and on 16 February 1920, this rank was made permanent.
After the war, Captain Gainard continued duty in the USS Charles until January 1920. Thereafter he served consecutively in the colliers, USS Vulcan and USS Neptune, until 30 June 1922, when he was released from active duty. He was honorably discharged on 22 November 1925.
Captain Gainard then served with the merchant marine. While Master of the SS Bakersfield he was commissioned Lieutenant Commander in the US Naval Reserve on 27 April 1929.
He was master of the American steamer City of Flint, a Maritime Commission cargo ship , in the fall of 1939. Following the sinking of the Athena in the North Atlantic on 3 September 1939, the City of Flint picked up more than two hundred survivors from the Athena and brought them to a United States port. In spite of being a freighter, the City of Flint had sailed from Glasgow with twenty-nine passengers (Americans in Europe at the beginning of the War). Provisions having been made for these passengers contributed to the ability of the City of Flint to provide for the survivors of the Athena.
On 3 October 1939, the City of Flint sailed from New York with a general cargo for Liverpool and Glasgow. On 9 October 1939, she was captured by a German cruiser (the pocket battleship Deutschland), about one thousand two hundred and fifty miles from New York. She was manned by a German prize crew and, flying the German flag, was taken into the Harbor of Tromsø, Norway, on 21 October 1939. The Norwegian government refused her permission to anchor, so the German crew took her into the harbor of Murmansk, Russia, on 23 October 1939. Claiming "haverie" (sea damage), the German crew obtained permission from the Soviet authorities to anchor at Murmansk. When the Soviet authorities judged that the vessel was again fit to put to sea, she was ordered to leave the port of Murmansk under the same conditions as those of her entry, namely, with both German and American crews on board and her cargo intact. The German crew took the City of Flint into the harbor of Haugesund, Norway, in November 1939. In spite of refusal of Norwegian authorities to grant her permission to anchor, she was anchored at Haugesund. In accordance with international law, the Norwegian government then interned the German crew and released the American crew. Captain Gainard landed his cargo at Bergen, Norway, and brought the City of Flint, again flying the American flag, back to the United States. The return trip was made without interference.
For his service during this time, Captain Gainard was awarded the Navy Cross, and cited as follows:
NAVY CROSS: "For distinguished service in the line of his profession so ably demonstrated while master of the Steamer, City of Flint, at the time of its seizure upon the high seas and during its detention by armed forces of a belligerent European power. His skill, fine judgment and devotion to duty were of the highest order and in accordance with the best traditions of the Naval Service."
In the spring of 1940, Captain Gainard had a period of training at the Merchant Marine Training Center, USS Seattle, New York, New York.
On 30 July 1941, he was again recalled to active duty and ordered to report to Inshore Patrol, First Naval District, for duty in connection with the Local Defense Force. On 18 November 1941, he became Commander, Boston Section, Inshore Patrol. On 5 January 1942, he was promoted to Commander, and on 3 April 1942, he reported to the Navy Yard, New York, New York, for duty in connection with the conversion of a merchant ship in to the Navy tanker, USS Big Horn.
He assumed command of that vessel on her commissioning. On 9 June 1943, he was commissioned Captain, to rank from 20 June 1942, and later in 1943, he was transferred to command of the USS Bolivar. While in that command he died as a result of illness, on 23 December 1943, at the Naval Hospital, San Diego, California.
In addition to the Navy Cross, Captain Gainard had the Victory Medal, Transport Clasp; the American Defense Service Medal and was entitled to the American Campaign Medal and the World War II Victory Medal.
A destroyer, the USS Gainard, was named in his honor. His widow, Mrs. Joseph A. Gainard, who at the time lived in Massachusetts, sponsored the vessel when she was launched at the plant of the Federal Shipbuilding and Dry Dock Company, Kearny, New Jersey.