We consider entrainment by periodic force of limit cycles which are close to the homoclinic bifurcation. Taking as a physical example the nanoscale spin-torque oscillator in the LC circuit, we develop the general description of the situation in which the frequency of the stable periodic orbit in the autonomous system is highly sensitive to minor variations of the parameter, and derive explicit expressions for the strongly deformed borders of the resonance regions (Arnold tongues) in the parameter space of the problem. It turns out that proximity to homoclinic bifurcations hinders synchronization of spin-torque oscillators.