Gilbert studied for a Bachelor of Science at the University of Florida, from 1940 to 1942. He then moved to the University of Wisconsin–Madison for this PhD, which he obtained in 1945 under the supervision of Samuel M. McElvain. While at Wisconsin he met Carl Djerassi, with whom he would go on to form a lasting friendship.