Space–time correlations and frequency spectra of wall-pressure fluctuations, obtained from direct numerical simulation, are examined to reveal the effects of pressure gradient and separation on the characteristics of wall-pressure fluctuations. In the attached boundary layer subjected to adverse pressure gradient, contours of constant two-point spatial correlation of wall-pressure fluctuations are more elongated in the spanwise direction. Convection velocities of wall-pressure fluctuations as a function of spatial and temporal separations are reduced by the adverse pressure gradient. In the separated turbulent boundary layer, wall-pressure fluctuations are reduced inside the separation bubble, and enhanced downstream of the reattachment region where maximum Reynolds stresses occur. Inside the separation bubble, the frequency spectra of wall-pressure fluctuations normalized by the local maximum Reynolds shear stress correlate well compared to those normalized by free-stream dynamic pressure, indicating that local Reynolds shear stress has more direct influence on the wall-pressure spectra. Contour plots of two-point correlation of wall-pressure fluctuations are highly elongated in the spanwise direction inside the separation bubble, implying the presence of large two-dimensional roller-type structures. The convection velocity determined from the space–time correlation of wall-pressure fluctuations is as low as 0.33U0 (U0 is the maximum inlet velocity) in the separated zone, and increases downstream of reattachment.