Gram studied at the University of Copenhagen and was an assistant in botany to the zoologist Japetus Steenstrup.
Gram belajar botani di University of Copenhagen dan asisten dalam botani untuk ahli zoologi Japetus Steenstrup.