Jacques Le Goff, in the book La civilisation de l'Occident médieval, portrays that the claim of the Holy Roman Empire is by Translatio Imperii, which is a concept of where the rights of succession of the Roman Empire is passed down through different sets of monarchs who controlled a part (or better, the entirety) of the Roman Empire.
To better illustrate the concept of Translatio Imperii, we must first look at the state of the Roman Empire when the HRE was first instituted. Before Charlemagne's coronation and the resurrection of the idea of a Roman Empire in the West, James Bryce (in his book The Holy Roman Empire posits that the separate crowns of West Roman Empire and East Roman Empire, divided by Diocletian, was made one when the last Western Emperor, Romulus Augustulus, was cast down by Odoacer. Now, this meant that by doing so, the Roman Empire was then established in the East with Constantinople as its center, one and whole.
Pope Leo III's idea of Translatio Imperii, which is the primary claim of the Holy Roman Empire to the Roman Empire, is essentially transferring back the Roman Empire to its old capital of Rome away from Constantinople, and this move was motivated (outwardly, at the very least) due to a female monarch (Irene of Athens) taking the throne of the Roman Empire in 797, which is an invalid idea to the Catholic Church which saw itself as the preserver of the holiness of the Roman Empire that came to be since Constantine I's conversation to Christianity.
To quote Bryce, "They (Pope Leo and Charlemagne) too, like their predecessors, held the Roman Empire to be one and indivisible, and proposed by the coronation of the Frankish king not to proclaim a severance of the East and West, but to reverse the act of Constantine, and make Old Rome again the civil as well as the ecclesiastical capital of the Empire that bore her name..." (Annotations added)
Speaking from an admittedly novice experience of looking through other European kingdom's inheritance laws, Pope Leo's idea is somewhat invalid, and tenuous at best. The Roman Empire, though traditionally led by male emperors, had a record of having a female monarch as well, Pulcheria. Yes, one can argue that she was not allowed to rule the empire alone and had to find a suitable husband, but she were crowned as Basileia nonetheless, thereby disproving Pope Leo's reason that the crown of Roman Emperor had to go to a male ruler.
Sources: *The Holy Roman Empire, by Viscount James Bryce. Link to online PDF copy: http://files.libertyfund.org/files/2337/Bryce_1513_EBk_v6.0.pdf