We compute the periastron advance using the effective-one-body formalism for binary black holes moving on quasi-circular orbits and having spins collinear with the orbital angular momentum. We compare the predictions with the periastron advance recently computed in accurate numerical-relativity simulations and find remarkable agreement for a wide range of spins and mass ratios. These results do not use any numerical-relativity calibration of the effective-one-body model, and stem from two key ingredients in the effective-one-body Hamiltonian: (i) the mapping of the two-body dynamics of spinning particles onto the dynamics of an effective spinning particle in a (deformed) Kerr spacetime, fully symmetrized with respect to the two-body masses and spins, and (ii) the resummation, in the test-particle limit, of all post-Newtonian (PN) corrections linear in the spin of the particle. In fact, even when only the leading spin PN corrections are included in the effective-one-body spinning Hamiltonian but all the test-particle corrections linear in the spin of the particle are resummed we find very good agreement with the numerical results (within the numerical error for equal-mass binaries and discrepancies of at most 1% for larger mass ratios). Furthermore, we specialize to the extreme mass-ratio limit and derive, using the equations of motion in the gravitational skeleton approach, analytical expressions for the periastron advance, the meridional Lense-Thirring precession and spin precession frequency in the case of a spinning particle on a nearly circular equatorial orbit in Kerr spacetime, including also terms quadratic in the spin.