There can be instances where the trust wont be able to distribute trust income (that includes a CGT gain) to a beneficiary. Or the trustee may be able to but may choose not to. ...eg to use carried fwd losses. However provided the trustee has made a valid income distribution this is not usually a concern.
The Trustee may also choose to pay the CGT on behalf of a beneficiary. The beneficiary is bound by the trustee choice. A good example is a non-resident. Tax law may force the trustee to pay tax that is then creditable to the beneficiary.