You specify airfoil which suggests 2 dimensions, but there is no gravity for a two-dimensional object. Gravity requires mass to act. Airfoils do not have mass.
The concept called "airfoil" is a way of conceptually, and for the engineers mathematically, analyzing the combined problem of lift, moment, and drag for lifting surfaces. We like to start in 2D to make life easier. Obviously a 2D lifting surface can't lift anything until we extend it into the third plane, but the flow analysis is valid to an extent. In other words, if you can understand how flow goes around a 2D "slice" of a wing, then you have a valid starting point for explaining and modeling the flow around an entire 3D wing. And then can gravity come into play.
Using circulation, Kutta condition, and some handy mathematics like vector components, we can add up the lift obtained from a wing into a single vector that more or less points upwards. Actually it points slightly backwards because when we locate the drag vector the two must be added to find useful lift. The point at which this resultant vector extends from the chord line of the airfoil is the aerodynamic center of lift. Pressure center is the same thing, a resultant vector summation of the various pressure values found around the airfoil.
When we extend the airfoil into the full 3D wing we can find a center of gravity or CG. It slides around fore/aft, left/right depending on the mass distribution of the wing or airplane. If your fat passengers go to the back it slides aft, etc. A single summary vector pointing toward the center of the earth can be determined, the center of gravity. We represent the location with a vector.