Here is an easier example.
Think of a truck that sits on a street that is going slightly uphill. There is no way that you and your buddy could lift that truck straight up in the air. But you can relativily easy push it uphill. In the end the truck is going up.
Now, what's the physics behind that and how does it relate to planes? Well, you don't have to lift the entire car when pushing. Most of the force from gravity is resisted by the ground. You only have to push against the much smaller horizontal component that tries to push the car downhill.
With planes you basically just replace "ground" by "lift". So instead of tires pressing against the ground, you have wings pressing against the air. And a jet engine instead of two guys pushing.
Basically a plane's engines are pushing the plane up a hill made of air.