Galatians 2:11-16 Walk the Line

In this short passage, we find that Paul opposes Peter. Why does he do this? What would have been at stake if he had not?
What was it that Peter was doing and why was he acting this way? We see that while believing one thing, he does another.
We discover this was no mere straying from the path but something that could have divided the church perhaps irreparably. But more so, it undermined the gospel and of the truth that we are saved by grace alone through faith. Christians are justified and made right with God because of what he has done for us and our faith in his work alone.