What causes the outward pressure that balances the inward pull of gravity in a star?

This is straight out of my Astronomy textbook from the last semester: "… imagine a slab of material in the solar interior. In equilibrium, the slab on average will move neither up nor down. (In, fact there are upward and downward motions of material inside the Sun, but these motions average out.) Equilibrium is maintained by a balance of among three forces that act on this slab:

1 The downward pressure of the layers of solar material about the slab.

2 The upward pressure of the hot gasses beneath the slab

3 The slab's weight - that is, the downward gravitational pull it feels from the rest of the sun. The pressure from below must balance both the slab's weight and the pressure from above. Hence, the pressure below the slab must be greater that that above the slab. In other words, pressure has to increase with increasing depth. For the same reason, pressure increases as you dive deeper into the ocean or as you move toward lower altitudes in our atmosphere." So I guess the answer you are looking for is "the inward pull of gravity is balanced out by the pressure of hot rising gasses."