Are there any official 5th Edition Dungeons and Dragons source books that define the difference (origin, power, attainment, etc.) between a god and a demigod?
In 5th Edition, demigods are the offspring of deities & mortals that fall under the quasi-deity category (though they are considered the least powerful quasi-deity). Quasi-deities are beings with divine origins which, in contrast to 'true' greater/lesser deities, have insufficient power to hear/answer prayers, grant cleric spells, or control aspects of mortal life (though quasi-deities have the capacity to become full gods with sufficient worshippers).
(Source: 'Divine Rank' sidebar, 5e DMG p.11)
I do not have enough experience with older editions to contrast against their definitions of demigods vs 'true' deities.
Deities & Demigods for AD&D1e is about the earliest place we might hope for a formal definition of the difference, but it isn't there. It says that demigods are divine beings, with all the standard powers of such (pp5-11) but they function at a minimum of 15th level, as opposed to 20th for gods, or 25th for greater gods. They can only grant spells of up to 5th level (out of 7) to their priests.
The usual route for a mortal adventurer to demigod status in those rules seems to be becoming a servitor of a major deity. After a few centuries of good service, you might get promoted to demigod, have a priesthood, and gain the ability to grant spells.