In 1940, Gaynes lived in France, but after the Battle of France and the German occupation, he escaped to the Pyrenees, but was soon arrested by the Francoist Spain police. In 1942 after his release, Gaynes intended to return to the Netherlands to join the Dutch resistance against the Nazi occupation, but instead made his way to the United Kingdom to enlist in the Royal Dutch Navy. On April 8, 1943, Gaynes was commissioned as a seaman recruit and assigned to the auxiliary ship , which was stationed at Holyhead in Wales. Because of his multilingualism (he spoke Dutch, English, French, Italian, and Russian), he was detached on May 1, 1943, to the Royal Navy as a translator assigned to the convoy commodore aboard , which participated during July and August 1943 in Operation Husky the Allied invasion of Sicily. On September 1, 1943, Gaynes was reassigned to the destroyer , which participated during January 1944 in the Battle of Anzio. On January 1, 1944, he was promoted to sergeant (petty officer, 1st class). After the Battle of Anzio, HMS "Wilton" was assigned to the Adriatic Sea and continued to see action during the Adriatic Campaign. On July 14, 1946, Gaynes was honorably discharged from the Royal Dutch Navy.