Previous answers are correct but incomplete, in that I suppose you do not much about Statistical Mechanics so maybe it's better to elaborate a little.
On a historical note, this is the same question that led Einstein to formulate is theory of Brownian motion and the same system I will describe now has been used by Perrin to measure Avogadro's number with a Nobel-winning experiment.
I will try to derive everything from simple formulas to make the answer clear.
EDIT: the author mentions the gas having constant PVT at equilibrium, whereas I Will assume that we are dealing with a system of N particles confined in a volume V and in contact with a thermostat (or with the environment) so that the temperature is always T. This situation I think better describes the everyday situation (e.g. sedimentation of colloids at room temperature) and it is easier to handle. The concepts about equilibrium in the answer are General and I Think the author did not choose those boundary conditions for a particular reason.
We start by defining our system: a cylinder of base $A$ and volume $V$ with inside $N$ molecules with mass $m$ at a temperature $T$. Gravity is acting parallel to the sides of the cylinder.
The gas is ideal so that $P(z) V(z) = N(z) k_B T$. Notice that while temperature is defined (as the mean kinetic energy is not affected by gravity), pressure and number of particles are a function of the height $z$ because gravity will pull molecules to the bottom and a gradient of density (and thus of pressure) will be formed as you suppose. Moreover $V(z)$ is the volume considered which contains $N(z)$ molecules. Think of it as a slice of the cylinder at height $z$.
Why doesn't everything sediment to the bottom and why are we still talking about equilibrium?
Molecules are still able to randomly move due to thermal fluctuations i.e. to diffuse. Yet as gravity pulls them to the bottom, a situation is created in which, since in the bottom there are more molecules than at the top, the probability of a molecule jumping "up" is higher than one jumping "down", so that as molecules sediment to the bottom they also manage to "jump up" a little. The more molecules at a given height, the more the probability of "jumping up" (the same holds for "jumping down", but at the top there are less molecules).
Equilibrium means that the two fluxes (one up due to diffusion and one down due to sedimentation) compensate so that there is no net flux of particles. The final (equilibrium distribution $N(z)$ (see image) is the one for which, at any $z$ the probability of jumping up/down are perfectly compensated.
$N(z)$" />
Can we find this distribution?
Yes, in two ways. Notice that from now on we will call $\rho(z)=N(z)/V$.
1)The thermodynamic (easy) way
We now that $P(z)V(z)=N(z)k_B T$. This means $\rho(z) = N(z)/V(z)=P(z)/k_BT$.
Now, what is the pressure inside a cylinder slice (of base $A$ and height $h$) at a given height $z$ from the bottom of the cylinder? It is given by the pressure "above" it $P(z+h)$, plus the weight of the slice (the number of particles $N(z)=\rho(z)V(z)$ inside the slice times $mg$) divided by the cylinder area $A$, so that
$$P(z)=P(z+h)+{\rho(z)V(z) mg \over A}$$
Using $V(z)=Ah$ and $\rho(z)=P(z)/k_BT$:
$$P(z)=P(z+h)+{P(z) mgh\over k_BT}$$
by dividing by $h$ and taking the limit $h\rightarrow 0$ we get a differential equation
$${dP(z)\over dz}=-P(z){mg\over k_B T}$$
which is easily solved as:
$$P(z)=P(0)e^{-mgz\over k_B T}$$
So we got the pression gradient. As we are in equilibrium, pressure is perfectly defined (despite being different) at any height. We only used the fact that there exists a state of the system in which the number of particles at a given height does not change over time (i. e. equilibrium or steady state - notice that this two concepts are actually slightly different but this is not relevant here).
What is the distribution of particles? Again using $\rho(z)=P(z)/k_BT$ we get
$$\rho(z)={P(0)\over k_B T}e^{-mgz\over k_B T}=\rho(0)e^{-mgz\over k_B T}$$
which as mentioned before is Boltzmann's distribution in the case of gravity.
Finally notice also that this section is equivalent to putting, as suggested by Chester Miller, the total force at any height to be vanishing as $A\left(P(z+h)-P(z)\right)+N(z)mg=0$, where $N(z)mg$ is weight and $A\left(P(z+h)-P(z)\right)$ the difference in force on the two sides of the cylinder, would give the same result. Notice also that if $g=0$ (no gravity) you find the normal result of constant pressure.
2)The statistical (hard) way
Just assume this the following formulas if you do not know them. They are quite easy to find anyway (look for mobility, diffusion current and drift current).
Gravity creates a flux of particles $J_g=\rho(z) \mu m g$ where $\mu$ is the particle mobility so that $\mu m g$ is the velocity due to the gravitational field. The flux due to particles moving randomly (diffusion) is given by $J_d=-\mu k_B T{d\rho(z)\over dz}$. By balancing fluxes so that $J_g=J_d$:
$$\rho(z) \mu m g=-\mu k_B T{d\rho(z)\over dz}$$
and again we find
$${d\rho(z)\over dz} = -\rho(z){mg\over k_B T}$$
which is the same equation as before with solution
$$\rho(z)=\rho(0)e^{-mgz\over k_B T}$$
Note that you can use both procedures with any external field, changing the force!
Both ways show that, even though there is a gradient of pressure, not only equilibrium exists (no fluxes of molecules and force balance) but that we can exploit it to find relevat results as $\rho(z)$ and $P(z)$ using what we know about equilibrium, e.g. $PV=Nk_B T$.
P.s. Take a look at Perrin's book about how He exploited this results to win a Nobel prize!