The first-principles quantum chemical computations often scale as Nk (N = basis sets; k = 1-4 for linear scaling, Hartree-Fock or density functional theory methods), which makes the development of accurate pseudopotentials and efficient basis sets necessary ingredients in modeling of heavy elements such as lanthanides and actinides. Recently, we have developed 4f-in-core norm-conserving pseudopotentials and associated basis sets for the trivalent lanthanides [Lu et al., J. Chem. Theory Comput. 19, 82-96 (2023)]. In the present paper, we present a unified approach to optimize high-quality Gaussian basis sets for modeling and simulations of condensed-phase systems. The newly generated basis sets not only capture the low total energy and fairly reasonable condition number of overlap matrix of lanthanide-containing systems, but also exhibit good transferability and reproducibility. These advantages ensure the accuracy of the basis sets while avoiding linear dependency concern of atom-centered basis sets. The performance of the basis sets is further illustrated in lanthanide molecular and condensed-phase systems by using Gaussian-plane wave density functional approach of CP2K. These new basis sets can be of particular interest to model structurally complicated lanthanide molecules, clusters, solutions, and solid systems.