We consider gradient Gibbs measures corresponding to a periodic boundary law for a generalized solid-on-solid (SOS) model with spin values from a countable set on a Cayley tree. On the Cayley tree, detailed information on gradient Gibbs measures for models of SOS type is given in Botirov and Haydarov (2020 J. Stat. Mech. 093102), Henning et al (2019 Electron. J. Probab.
24 104), Haydarov and Rozikov (2022 Rep. Math. Phys.
90 81–101) and Kulske and Schriever (2017 Markov Process. Relat. Fields
23 553–90). We continue this work for the generalized SOS model. Namely, in this paper, the problem of finding gradient Gibbs measures which correspond to periodic boundary laws is reduced to a functional equation and, by solving this equation, all gradient Gibbs measures with four periodic boundary laws are found.