According to the story that appears in Sefer Bamidbar (Chapter 25), at the moment when the Children of Israel engaged in sexual licentiousness combined with idol worship, it was the action of Pineḥas the son of Elazar whose father was Aharon, the High Priest, that saved the Jewish people from destruction. Pineḥas stepped forward and killed Zimri ben Salu, one of the heads of the tribe of Shimon, together with the Midianite woman with whom he sinned. As a reward, Pineḥas received a covenant of priesthood (Bamidbar 25:11-14).
It appears that although Aharon and his sons were anointed as priests (see Sefer Vayikra Chapter 8), Aharon’s son’s children who were alive at that time were not included in that ceremony. In the Gemara on today’s daf we find that Rabbi Elazar quotes Rabbi Ḥanina as teaching that although he was from the priestly line, Pineḥas did not become a kohen until after the incident mentioned above. Rav Ashi taught that it did not happen until many years later when the Children of Israel entered the land of Israel and Pineḥas played a central role in bringing peace to the warring tribes (see Sefer Yehoshua 22:30-34). It is only then that we find that the biblical text refers to him as Pineḥas HaKohen – Pineḥas the priest.
The Gemara continues and asks how the passage in Sefer Bamidbar that promises Pineḥas a covenant of priesthood should be understood according to this opinion, and explains that it might be understood simply as a blessing. Rashi explains that this means that it was a blessing for the future. Rabbeinu Tam, who was apparently uncomfortable with the idea that God would have blessed Pineḥas with status that could not be implemented, explains that from the time of the story in Sefer Bamidbar Pineḥas could have claimed the priesthood, and, in fact, began to keep the laws of priesthood. Nevertheless, the people who blamed him for the death of one of the leaders of the tribe of Shimon did not allow him to be anointed to serve in the Temple until he succeeded in establishing peace among the tribes in Sefer Yehoshua.