PHB states that:
[...] a paladin's oath is a powerful bond. lt is a source of power that turns a devout warrior into a blessed champion.
and later:
Although many paladins are devoted to gods of good, a paladin's power comes as much from a commitment to justice itself as it does from a god.
So, it seems that conviction, expressed formally by oath, is enough to make a paladin. This is confirmed by answers to the Are paladins required to follow a god? question.
What isn't answered in that question is what is the source of the spells he can cast. I'm OK with paladin powers can come from his stern commitment but spells are clerical ones, chosen and memorized in a way clerics use and definitely more varied and complicated than "Lay on hands" or paladin auras. With all due respect to paladins, I'd say someone intelligent is needed to shape them for a paladin to cast.
So, is it explained somewhere in the books what force grants the ability to cast actual clerical spells to irreligious (or even anti-theistic) paladins?
Perhaps I'm overcomplicating differentiating between simple paladin powers and true spells but willing magical effects by conviction is a notion fitting Mage: the Ascension, I wouldn't expect it in D&D.