Who was the last leader of the Holy Roman Empire?
Holy Roman Emperor
Charles V,  Holy Roman Emperor
The Holy Roman Emperor was widely perceived to rule by divine right, though he often contradicted or rivaled the Pope, most notably during the Investiture controversy. 
In theory, the Holy Roman Emperor was primus inter pares (first among equals) among other Catholic monarchs. In practice, a Holy Roman Emperor was only as strong as his army and alliances, including marriage alliances, made him. There was never a Holy Roman Empress regnant, though women such as Theophanu and Maria Theresa of Austria served as de facto Empresses regnant.
Throughout its history, the position was viewed as a defender of the Roman Catholic faith.  Until the Reformation, the Emperor elect (imperator electus) was required to be crowned by the Pope before assuming the imperial title. Charles V,  Holy Roman Emperor was the last to be crowned by the Pope in 1530. Even after the Reformation, the elected Emperor always was a Roman Catholic.  There were short periods in history when the electoral college was dominated by Protestants, and the electors usually voted in their own political interest. 