We consider the five-dimensional Einstein–Gauss–Bonnet gravity, which can be obtained by means of an appropriate choice of coefficients in the five-dimensional Lanczos–Lovelock gravity theory. The Einstein–Gauss–Bonnet field equations for the Friedmann–Lemaître–Robertson–Walker metric are found as well as some of their solutions. The hyperbolicity of the corresponding equations of motion is discussed. A four-dimensional gravity action is obtained from the Gauss–Bonnet gravity using the Randall–Sundrum compactification procedure and then it is studied the implications of the compactification procedure in the cosmological solutions. The same procedure is used to obtain gravity in four dimensions from the five-dimensional AdS–Chern–Simons gravity to then study some cosmological solutions. Some aspects of the construction of the four-dimensional action gravity, as well as a brief review of Lovelock gravity in 5D are considered in an Appendix.