Suppose one plate of the capacitor is grounded which means there is
charge present at only one plate.
The electric potential of an ideal ground does not change no matter how much charged is added or removed. From the Wikipedia article Ground (electricity)
In electronic circuit theory, a "ground" is usually idealized as an
infinite source or sink for charge, which can absorb an unlimited
amount of current without changing its potential.
So, attaching one capacitor plate to ground simply fixes the electric potential of that plate; if the ungrounded plate has charge $Q$, the grounded plate will have charge $-Q$.
how could the grounded plate gain -Q charge.
The ideal ground supplies the $-Q$ charge to the plate without changing potential.
If somehow it gains -Q charge it will flow to the earth.
No, that's not correct. A common problem in electrostatics is calculating the surface charge on a grounded plane when a charge $Q$ is placed some height above the plane. Essentially, the charge flows until the electrostatic energy of the configuration is minimum which, in the case of the grounded plate capacitor, is when there is charge $-Q$ on the grounded plate which is as close to the $Q$ charge as is possible.
OK I got u but why the potential across a grounded capacitor is taken
It isn't taken to be zero unless $Q=0$.