We report on the Gouy phase anomaly of light in the focus of cylindrical and spherical microlenses. The prime subject of our study concerns a discussion of how the very small size of microlenses affects the phase properties of light in their foci. We put emphasis on determining the amount of the Gouy phase shift for line and point foci within the limited axial space. Contrary to macroscopic lenses, the optical properties of microlenses are strongly governed by the effect of diffraction when their size tends to be comparable to the operation wavelength. In our study, we clearly show how such diffraction features affect the axial phase shift. For instance, phase singularities, which occur at discrete points on the optical axis where the total intensity vanishes for spherical microlenses, cause an additional axial phase shift when compared to the cylindrical microlens where those axial phase singularities are absent. The rotational symmetry of the Fresnel zones is the origin of such a difference between point and line foci.