במדבר פרק א, נא ֹותֹא ּומיִּקָֹי ןָֹּכְ שִּּמַה תֹנֲחַבּו םִּ יִּוְלַה ֹותֹא ּודיִּרֹוי ןָֹּכְ שִּּמַה ַעֹסְנִּבּו תָֹמּוי בֵרָֹ קַה רָֹּזַהְו םִּ יִּוְלַה
מסכת שבת דף לא/א
אמר ליה ההוא עובד כוכבים להלל מקרא זה על מי נאמר א"ל אפי' על דוד מלך ישראל
This Gemara is in the middle of the story of the non-Jew that came to Hillel and asked to be converted on the condition that he could become a Cohen Gadol. Hillel told him to study the entire Torah first. And when the non-Jew started to learn this verse, he approached Hillel and asked him to whom does this verse reference. And now Hillel told him even to Dovid HaMelech could not do the service of the Leviim (let alone the Cohanim). The non-Jew understood and then converted without the condition.
Why did Hillel mention the King? Reference is to another Gemara (Kerisus 6b) regarding the prohibition to benefit from anointing oil used for the Cohanim. In that Gemara a King is not included in the prohibition, since a King is not included in the category of an unauthorized person (זר). A King is also considered an anointed person. Nevertheless, in the matter of an unauthorized person for the service of the Leviim, a King is included in the prohibition.
Why did Hillel specify Dovid HaMelech? This alludes to the concept that even though converts are beloved to HaShem, and Dovid is descendent from Rus (probably the most famous convert), and Dovid was a King, nevertheless, this verse even applies to him. Further in Divrei HaYamim, one sees that Dovid desired to carry the Aron, he was specifically told that he could not since this was a job for the Leviim. How much more so, the prohibition to be a Cohen Gadol would apply to Dovid and thus, also, to this potential convert.
