Since John the Baptist performed all the baptisms in the Gospels, who baptized him?
We have no evidence from scripture that John the Baptist was ever baptized in the New Testament form, nor did he need to be baptized. The New Testament style of baptism was not a common practice prior to John, and it did not become a command for the New Testament believer until Jesus instituted it himself.
While Jews traditionally engaged in various washings under the Mosaic Law, immersion in water was not practiced by Jews as a sign of faith in Yahweh or as entry into Judaism. Judaism practiced circumcision as the rite of passage into the community of God's people, not immersion in water. In his ministry of baptism in the Jordan River, John the Baptist introduced something entirely new for Judaism, and later Jesus instituted it for His followers as well. Therefore, John never received water baptism in the way he practiced it, nor was it necessary for him to receive it.
Moreover, John the Baptist was already deceased by the time Christ commanded water baptism as an ordinance for the Church as the means of believers testifying to their personal repentance and acceptance of the Gospel. Since John the Baptist lived and died prior to Christ's sacrifice on the cross and the establishment of the Church at Pentecost, John was never considered part of the Church. He is often called the final Old Testament prophet.
In summary, John the Baptist was never under the New Testament command to be baptized himself, and his own ministry of baptism was a new ritual within Judaism intended to mark the Messiah's arrival. So John was the originator of water baptism for repentance, and therefore he himself did not need nor receive water baptism, at least not in the sense of how it is now practiced in the New Testament church.