And I went up by revelation, and communicated unto them that gospel which I preach among the Gentiles, but privately to them which were of reputation, lest by any means I should run, or had run, in vain.
Note 2 at Ga 2:2: Paul traveled to Jerusalem to defend the Gospel that God had given him to preach. He made it clear that this Gospel was not "learned" through man but given by a direct revelation of God (see note 2 at Ga 1:12 and note 12 at Ga 1:10).
Note 3 at Ga 2:2: Paul didn't compromise, but he didn't seek to offend either. The fact that he had this private meeting with the leaders of the Jerusalem church shows that he cared about how they received his message and the impact that their opinion would have. He sought peace with these leaders and he obtained it. If they would have refused to listen to the Holy Spirit and had rejected the Gospel, then it can be assumed that Paul would have heeded his own instructions in Ga 1:8-9.
There are many people today who have a truth from God and promote that truth at the expense of all other truths. They totally ignore the admonitions for unity among the body of Christ (see notes 1 and 2 at 1Co 1:10) and justify their actions by bragging on their refusal to compromise. This was not the way Paul conducted himself. His actions here should serve as an example to us all.
Note 4 at Ga 2:2: Three of these leaders were mentioned by name (Ga 2:9): James, the Lord's brother and overseer of the Jerusalem church (see note 2 at Joh 2:12); John (see Life for Today Study Bible Notes, Introduction to John, About the Author), the apostle and son of Zebedee; and Cephas, or the Apostle Peter (see note 3 at Mt 16:18), who had already been called before the Jerusalem church for his work among the Gentiles (Ac 11:1-18).
So, the "big four" are together--Peter, James, John, and Paul--to discuss the problems of the Gospel and the Law among the Jews and Gentiles. They came into unity and presented a united witness to the truth of the Gospel.