The spin Hall effect (SHE) of light, as an analogue of the SHE in electronic systems, is a promising candidate for investigating the SHE in semiconductor spintronics/valleytronics, high-energy physics and condensed matter physics, owing to their similar topological nature in the spin-orbit interaction. The SHE of light exhibits unique potential for exploring the physical properties of nanostructures, such as determining the optical thickness, and the material properties of metallic and magnetic thin films and even atomically thin two-dimensional materials. More importantly, it opens a possible pathway for controlling the spin states of photons and developing next-generation photonic spin Hall devices as a fundamental constituent of the emerging spinoptics. In this review, based on the viewpoint of the geometric phase gradient, we give a detailed presentation of the recent advances in the SHE of light and its applications in precision metrology and future spin-based photonics.