We compute the dynamical spin structure factor S(k, ω) of the SU(3) Heisenberg chain variationally using a truncated Hilbert space spanned by the Gutzwiller projected particle-hole excitations of the Fermi sea, introduced in [B. Dalla Piazza et al., Nature Physics 11, 62 (2015)], with a modified importance sampling. We check the reliability of the method by comparing the S(k, ω) to exact diagonalization results for 18 sites and to the two-soliton continuum of the Bethe Ansatz for 72 sites. We get an excellent agreement in both cases. Detailed analysis of the finite-size effects shows that the method captures the critical Wess-Zumino-Witten SU(3)1 behavior and reproduces the correct exponent, with the exception of the size dependence of the weight of the bottom of the conformal tower. We also calculate the single-mode approximation for the SU(N ) Heisenberg model and determine the velocity of excitations. Finally, we apply the method to the SU(3) Haldane-Shastry model and find that the variational method gives the exact wave function for the lowest excitation at k = ±2π/3.