When Peter and the other Jewish believers stopped eating with non-Jewish believers, they were sending the wrong message. Their actions suggested that believing in Jesus was not enough and that people also needed to follow Jewish laws to be truly accepted by God. Paul strongly argues against this. He explained that we are made right with God only through his kindness (grace) when we believe in Jesus (Ephesians 2:8–9).
We cannot tell exactly where Paul's public words to Peter end and his message to the Galatians begins (see study note on Galatians 2:16). When Paul corrected Peter, he was also correcting the Galatians (see 3:1).