Overview
By the Grace of God (, abbreviated D.G.) is a formulaic phrase used especially in Christian monarchies as an introductory part of the full styles of a monarch. For example in England and later the United Kingdom, the phrase was formally added to the royal style in 1521 and continues to be used. For example, on UK coinage, the abbreviation DG appears today.
History and rationale
Originally, it had a literal meaning: the divine right of kings was invoked—notably by Christian monarchs—as legitimation (the only one above every sublunary power) for the absolutist authority the monarch wielded, that is, the endorsement of God for the monarch's reign.
By custom, the phrase "by the Grace of God" is restricted to sovereign rulers; in the feudal logic, a vassal held fief not by the grace of God, but by grant of a superior noble. Yet this did not stop kings using it, even when they did homage to the pope (as viceregent of God) or another ruler, such as the Kingdom of Bavaria, a state of the Holy Roman Empire.
From Wikipedia (CC BY-SA 4.0).