The self-consistent Relativistic Quasiparticle Random Phase Approximation (RQRPA) is extended by the quasiparticle-phonon coupling (QPC) model using the Quasiparticle Time Blocking Approximation (QTBA). The method is formulated in terms of the Bethe-Salpeter equation (BSE) in the two-quasiparticle space with an energy-dependent two-quasiparticle residual interaction. This equation is solved either in the basis of Dirac states forming the self-consistent solution of the ground state or in the momentum representation. Pairing correlations are treated within the Bardeen-Cooper-Schrieffer (BCS) model with a monopole-monopole interaction. The same NL3 set of the coupling constants generates the Dirac-Hartree-BCS single-quasiparticle spectrum, the static part of the residual two-quasiparticle interaction and the quasiparticle-phonon coupling amplitudes. A quantitative description of electric dipole excitations in the chain of tin isotopes (Z = 50) with the mass numbers A = 100, 106, 114, 116, 120, and 130 and in the chain of isotones with (N = 50) 88 Sr, 90 Zr, 92 Mo is performed within this framework.