Successive magnetic phase transitions at $T_1$=17.5 K and $T_2$=18.5 K in Gd$_3$Ru$_4$Al$_{12}$, with a distorted kagome lattice of Gd ions, is studied using resonant X-ray diffraction with polarization analysis. It has been suggested that in this compound the $S=7/2$ spins on the nearest-neighbor Gd-triangle form a ferromagnetic trimer and the Gd lattice can be effectively considered as an antiferromagnetic triangular lattice of $S=21/2$ spin trimers [S. Nakamura et al., Phys. Rev. B 98, 054410 (2018)]. We show that the magnetic order in this system is described by an incommensurate wave vector $q$~(0.27, 0, 0), which varies slightly with temperature. In the low temperature phase below $T_1$, the experimental results are well explained by considering that the spin trimers form a helical order with both the $c$-axis and $c$-plane components. In the intermediate phase above $T_1$, the $c$-axis component vanishes, resulting in a sinusoical structure within the $c$-plane. The sinusoidal-helical transition at $T_1$ can be regarded as an ordering of chiral degree of freedom, which is degenerate in the intermediate phase.