We have investigated the structural development during order-order transitions to the double-gyroid (DG) phase of nonionic surfactant/water systems based on two-dimensional small-angle x-ray scattering patterns from highly oriented ordered mesophases. The lamellar (L) to DG transition proceeds through two intermediate structures, a fluctuating perforated layer structure having ABAB stacking and a hexagonal perforated lamellar structure with ABCABC stacking (HPLABC). For a hexagonally packed cylinder (H) to DG transition, we also observed the HPLABC structure as the intermediate phase, thus the HPLABC is an entrance structure for the DG phase. The hexagonal perforated lamellar (HPL) structure consists of hexagonally packed holes surrounded by the planar tripods, and the transition from HPL structure to the DG phase proceeds by rotation of the dihedral angle of connected tripods. A geometrical consideration shows that large deformations of HPL planes are necessary to form the DG structure from the HPLABC structure, whereas the transition from a HPL structure with ABAB stacking (HPLAB) to the DG structure is straightforward. In spite of the topological constraints, the HPLABC structure is observed in the kinetic pathway to the DG structure.