Seismic analysis of dam-foundation systems is inherently complex due to uncertainties in material properties. This study investigates the effects of material randomness and heterogeneity on the seismic response of gravity dam-foundation systems using the stochastic spectral finite element method (SSFEM) based on the Karhunen Loève expansion and the polynomial chaos expansion. The Pine Plane dam is taken as an analysis example. First, the appropriate Karhunen Loève expansion modes and polynomial chaos order are determined for SSFEM by comparing them with the Monte-Carlo simulations. Subsequently, the seismic response of the dam is analyzed in the stochastic and deterministic models, respectively. Results indicate that material randomness and heterogeneity may reduce the seismic response of gravity dams, and the deterministic model may overestimate dynamic responses. Subsequently, the parametric analysis of the correlation length, which measures the spatial correlation between variables in different positions and indicates the size of heterogeneity material patches, is conducted. It is demonstrated that the correlation length would not significantly affect the mean responses, but a larger correlation length leads to greater dispersions in responses. Finally, the effects of randomness in the foundation are investigated. The heterogeneities in the foundation affect the response of the dam in the high-frequency range. Therefore, the uncertainty in material properties should be fully considered in a structural assessment and risk analysis.