There is indeed a Jewish law that requires two witnesses be present in order for a court to convict someone accused of a crime.
A single witness shall not prevail against a man for any crime or for
any wrong in connection with any offense that he has committed; only
on the evidence of two witnesses, or of three witnesses, shall a
charge be sustained. (Deut. 19:15)
This is quite consistent to the teaching of Jesus in Matthew 19, and it also fits with Talmudic procedure. According to Britannica:
Jewish law was extremely strict regarding evidence acceptable in
court. In cases entailing physical punishment, no circumstantial
evidence, confession, or self-incrimination was recognized. The
testimony of two eyewitnesses who confronted the defendant was
required.
However, I do not think this requirement applies here. There are two reasons:
- the facts were not disputed so there was no need of witnesses. We cannot envision Peter defending himself on grounds that he did not formerly eat with Gentiles and only withdrew from them once the men from James arrived.
- this was not a matter of law, at least not for Paul. No court [either Roman, Jewish or Christian] was involved and Peter was not accused of an actual crime. Paul believed Peter had acted hypocritically, but it is highly doubtful that we would bring formal charges against him. He must have meant that Peter "stood condemned" in a moral sense not a formal one.
It is possible that Paul felt it was only fair to confront Peter "face to face," but it is hard to imagine him doing so based on a requirement of the OT Law, since he did not consider himself bound by it. Mt. 19 might apply but was this even known to Paul? We simply don't know since he rarely quotes Jesus (not to mention the critical view that Mt. 19 comes from a later time). The reason for the confrontation was that the church had become divided. Peter sided with the men from James; Paul sided with the Antiochan converts who felt excluded and offended. The matter had to be aired, or it would fester even after the "men from James" departed. Moreover Paul mentions himself alone as representing one side of the controversy, while Peter, Barnabas and the men from James represent his opposition.
Also, Paul's rhetoric here should also be understood in the context of his need to establish his own authority to stand on an equal footing with the church elders as an apostle in his own right. Indeed this is the very reason he relates the story of the confrontation with Peter in the first place:
When they [the leaders of the Jerusalem church] saw that I had been
entrusted with the gospel to the uncircumcised, just as Peter had been
entrusted with the gospel to the circumcised... and when they perceived the grace that was
given to me, [then] James and Cephas and John, who were reputed to be
pillars, gave to me and Barnabas the right hand of fellowship, that we
should go to the Gentiles and they to the circumcised... But when Cephas came to Antioch I opposed him to his face, because
he stood condemned (Gal. 2:7-11)
In that context, Paul's confrontation with Peter is a powerful demonstration of his spiritual courage as an apostle equal in authority even to Peter. He seems to be telling us that proper procedure, whatever it might be here, is trumped by godly indignation. This is Paul speaking truth to power, not Paul being careful to follow the rules.
Conclusion: Dt. 19 indeed forms the basis of Mt. 19 regarding witnesses and these teachings could possibly provide a reason why Paul felt that he should openly confront Peter at Antioch. However, I think it is more accurate to interpret the phrase "stood condemned" only in its moral sense, not as a legal matter requiring witnesses. Thus the phrase "opposed him to his face" means just that. Paul here affirmed his authority as an apostle with just as much authority as any other. He was not referring to Jewish legal procedure or church tradition.