The influence of particle-phonon coupling on pairing correlations in nuclei is studied by solving the Dyson equation including the anomalous (pairing) Green function. We develop the formalism for solving the equation with the minimum of approximations. The solution of the Dyson equation is compared with the diagonalization of particle-phonon coupled Hamiltonian in a small space. This comparison reveals that the effect of many-phonon states is incorporated in the Dyson equation. We calculate the pairing gap of the neutron in 120Sn. We compare analytically the present method with a simpler treatment based on Bloch-Horowitz perturbation theory.