We have already learned that the kohen gadol – the High Priest – is limited by the Torah (see 21:10-15) with regard to who he can marry, even more so than an ordinary kohen. While an ordinary kohen cannot marry a gerusha (divorcee), zona (harlot) or halala (a woman who was defiled by a forbidden sexual encounter), the kohen gadol can also not marry an almana (widow). What if an ordinary kohen was betrothed to an almana and he receives an appointment to be the kohen gadol? Can he still marry his betrothed?
The Mishna on our daf rules that he can marry the widow, and even describes such a case that happened: a prominent widow named Marta bat Baitos was engaged to Yehoshua ben Gamla, who was appointed to be kohen gadol, and he nevertheless married her.
The Gemara relates that Yehoshua ben Gamla was not appointed by his fellow kohanim, but by King Yannai, with Rav Asi going so far as to accuse Marta bat Baitos of bribing the king in order to secure the position for her soon-to-be husband.
Yehoshua ben Gamla is most likely one of the last kohanim gedolim of the second Temple period, who is mentioned in Josephus as Yehoshua ben Gamliel. If this identification is correct, he was appointed to this position by King Agrippas II (Tosafot point out that the “King Yannai” mentioned in the story cannot be the Hasmonean king by that name, since he had appointed himself to be the High Priest. The Sages used the name “King Yannai” to signify any one of a number of second Temple period kings when they wanted to express negative feelings about them. While Agrippas I was friendly with the Sages, his son, Agrippas II, was considered an enemy of tradition. Among his faults was his practice of selling the position of High Priest.)
The negative description in our Gemara notwithstanding, elsewhere Yehoshua ben Gamla is praised by the Sages for a number of things, among them donating golden plates for the Yom Kippur lottery, but chiefly for instituting a formal elementary school system in every city in Israel. This led the Sages to say about him, “were it not for him, the Torah would have been totally forgotten.”