If the Apply Gift to Pledge option is grayed out, the gift may be marked as Posted.

You can Unpost the gift and apply it to the Pledge or Add a new cash gift and apply this new gift to the pledge.