The statement is inaccurate. A better statement would be something like:
A chemical equilibrium can not be established if one of the products is continuously removed (i.e. its concentration always decreases).
If one of the products is a gas and can mix with earth's entire atmosphere, that would make its concentration (or partial pressure) drop to almost zero. In order to establish an equilibrium, however, all concentrations have to be non-zero. Otherwise, the equilibrium constant will not be equal to the reaction quotient, and there will continue to be a net reaction.
In case of the precipitation, the solute is not continuously removed. At some point, the solution will no longer be supersaturated, so then the concentration of solute will be constant.
My teacher told me about about a reaction
$\ce{Ca(HCO3)2(aq) + heat -> CaCO3 +CO2 +H2O}$
and on cooling the solution and bubbling CO2(g)
through it the CaCO3(ppt.) reacts back to form calcium bi-carbonate.
Once you change the temperature, you don't expect the reaction to stay at equilibrium. So this does not support either the original statement or the opposite statement.
But I want to know if precipitation reactions can attain equilibrium. Why does the book state otherwise?
Yes, it can. Here is an example:
$$\ce{Ag+(aq) + Cl-(aq) <=> AgCl(s)}$$
The equilibrium constant expression for this reaction is:
$$K = \frac{1}{[\ce{Ag+(aq)}][\ce{Cl-(aq)}]}$$
(I could have written the chemical equation in the other direction, and then the equilibrium constant would have been the solubility product.) So the product is a solid, and its concentration does not change. The silver and chloride ion concentrations will drop until the equilibrium has been reached.
Here is another set of reactions:
$$\ce{CoCl4^2-(aq) + 6 H2O(l) <=> Co(H2O)6^2+(aq) + 4 Cl-(aq)}\tag{1}$$
$$\ce{Ag+(aq) + Cl-(aq) <=> AgCl(s)}\tag{2}$$
Here, the equilibrium of the first reaction will be far on the right side because the second reaction removes a lot (but not all) chloride ions from the solution if the silver ions are in excess of the chloride ions. Still, the system will reach equilibrium.
Why does the book state otherwise?
I don't know. Maybe they consider an equilibrium where one of the species is at extremely low concentration not an equilibrium. Or maybe it is a typo.
It is great to have a critical mindset when reading books and hearing people talk about chemistry. Even if all the statements are true, it helps you learn.
edit
I want to know if in a reaction like
$$\ce{AgNO3(aq) + NaCl(aq)\to AgCl(s,ppt) + NaNO3(aq)}$$
the precipitate $\ce{AgCl(s,ppt)}$ can react with $\ce{NaNO3(aq)}$ in the solution to give the reactants?
Yes. I would rather write it like this, though:
$$\ce{Ag+(aq) + NO3-(aq) + Na+(aq) + Cl-(aq) <=> AgCl(s) + Na+(aq) + NO3-(aq)}$$
and then leave out the spectator ions:
$$\ce{Ag+(aq) + Cl-(aq) <=> AgCl(s)}$$
The following "reaction" might serve as illustration why leaving the spectator ions in the equation is not a good idea in preparation for writing the equilibrium constant expression:
$$\ce{KCl(aq) + NaNO3(aq) <=> KNO3(aq) + NaCl(aq)}$$
For this "reaction", the concentration of species is undefined. Writing the equilibrium constant would be strange because how can I tell apart $\ce{KCl(aq) + NaNO3(aq)}$ from $\ce{KNO3(aq) + NaCl(aq)}$ if they fully ionize in solution? If I show the ions separately, it becomes clear that the "reaction" is not a reaction:
$$\ce{K+(aq) + Na+(aq) + NO3-(aq) + Cl-(aq) <=> \mathrm{the\ same???}}$$
I've seen this and this but couldn't understand.
Those two Q&A's are quite confusing, I agree.