We propose a fast spectral method for solving the generalized Enskog equation for dense gases. For elastic collisions, the method solves the Enskog collision operator with awhere d is the dimension of the velocity space, and M d−1 and N d are the number of solid angle and velocity space discretizations, respectively. For inelastic collisions, the cost is N times higher. The accuracy of this fast spectral method is assessed by comparing our numerical results with analytical solutions of the spatially-homogeneous relaxation of heated granular gases. We also compare our results for force-driven Poiseuille flow and Fourier flow with those from molecular dynamics and Monte Carlo simulations. Although it is phenomenological, the generalized Enskog equation is capable of capturing the flow dynamics of dense granular gases, and the fast spectral method is accurate and efficient. As example applications, Fourier and Couette flows of a dense granular gas are investigated. In addition to the temperature profile, both the density and the high-energy tails in the velocity distribution functions are found to be strongly influenced by the restitution coefficient.