Accurate prediction of real gas flows with strongly variable properties is an essential prerequisite for turbomachinery performance analysis. This paper presents a density-based solver for real gas flows in turbomachinery. The solver employs a third-order discretization scheme to improve computational accuracy. Real gas equations of state and look-up table are utilized in the solver to account for the strong nonlinear variations of thermophysical properties. The preconditioning method is adopted for simulations, including low-Mach flow regions, to address convergence difficulties. The implicit Time Consistent Preconditioned Gauss-Seidel Scheme (TCPGS) is employed for the time-stepping. The solver is validated by transonic compressor cascade wind tunnel experiments. Numerical test cases are adopted to evaluate the solver performance, including NASA Rotor 67, NASA Rotor 37, real gas flows in the Laval nozzle, and compressor seal. It has been proved that the numerical test results are consistent with published technical data. The advantages of this solver include numerical stability, computational efficiency, and physical accuracy, which indicate its applicability in the turbomachinery design process for real gases.