In this paper, the inverse spectral problem method is used to integrate a nonlinear sine-Gordon type equation with an additional term in the class of periodic infinite-gap functions. The solvability of the Cauchy problem for an infinite system of Dubrovin differential equations in the class of three times continuously differentiable periodic infinite-gap functions is proved. It is shown that the sum of a uniformly convergent functional series constructed by solving the system of Dubrovin equations and the first trace formula satisfies sine-Gordon-type equations with an additional term.