We present a study on the determination of rotation periods (P) of solar-like stars from the photometric irregular time sampling of the European Space Agency Gaia mission, currently scheduled for launch in 2013, taking into account its dependence on ecliptic coordinates. We examine the case of solar twins as well as thousands of synthetic time series of solar-like stars rotating faster than the Sun. In the case of solar twins, we assume that the Gaia unfiltered photometric passband G will mimic the variability of the total solar irradiance as measured by the Variability of solar IRradiance and Gravity Oscillations (VIRGO) experiment. For stars rotating faster than the Sun, light curves are simulated using synthetic spectra for the quiet atmosphere, the spots and the faculae combined by applying semi-empirical relationships relating the level of photospheric magnetic activity to the stellar rotation and the Gaia instrumental response. The capabilities of the Deeming, Lomb–Scargle and phase dispersion minimization methods in recovering the correct rotation periods are tested and compared. The false alarm probability is computed using Monte Carlo simulations and compared with analytical formulae. The Gaia scanning law makes the rate of correct detection of rotation periods strongly dependent on the ecliptic latitude (β). We find that for P≃ 1 d, the rate of correct detection increases with β from 20–30 per cent at β≃ 0 to a peak of 70 per cent at β= 45°; then it abruptly falls below 10 per cent at β > 45°. For P > 5 d, the rate of correct detection is quite low and for solar twins is only 5 per cent on average.