This is a speculative fan theory. As far as I am aware, the following is an attempt at rationalizing certain events in story that are, AFAIK, never given adequate explanation. I have watched all but a few seasons of the show from the beginning, and read a number of Dr. Who books, without ever coming across something that could work as a direct answer to your question, thus why I find myself offering speculation.
Each successive regeneration the Doctor has had has been bigger than the last. There are a few regenerations I have yet to see, but from the beginning, each one has been bigger than the last. My personal theory is that the energy for regeneration comes from absorbed temporal energy. The Time Lords who never left Gallifrey experienced a continual low level exposure to these energies from the untempered schism. Time travel via TARDIS exposes the Doctor to significantly more temporal energy, and he describes himself as having traveled in time more than anyone else when explaining why his tomb, and the temporal scar inside, were so dangerous. It is the combination of these events, added to the kickstart to his system provided by Gallifrey, that make this particular regeneration so enormous.
As to how the Doctor could continue to regenerate: since the season where the 12 regeneration limit was revealed there have been a number of stories that show ways around it. The Master has extended his life beyond his twelveth regeneration on three different occasions that I am aware of. He has also been brought back from being totally, completely, and finally dead twice that I know of. Any rules we might come up with now will almost certainly be rewritten by episodes yet to come.
Will Capaldi's end be as flashy as Smith's? We can only wait and see.