We prove that in the polynomial ring Q=k[x,y,z,w], with k an algebraically closed field of characteristic zero, all Gorenstein homogeneous ideals I satisfying the inclusions (x,y,z,w)4⊆I⊆(x,y,z,w)2 can be obtained by doubling from a grade three perfect ideal J⊂I such that Q/J is a locally Gorenstein ring. Moreover, a graded minimal free resolution of the Q-module Q/I can be completely described in terms of a graded minimal free resolution of the Q-module Q/J and a homogeneous embedding of a shift of the canonical module ωQ/J into Q/J.