Go to App Store - Featured, scroll down to your Apple ID and sign out. Then sign in again with your existing Apple ID. Hopefully, when you do so, the popup will appear where you can agree to terms and conditions, as requested.
Or, if possible, delete the iCloud account and set it up again afterwards. If you can't do this, look at Settings - General - Restrictions. If Allow Changes is disabled for Accounts, then this is the reason why iCloud is greyed out.
Maybe restarting your device will help also: turn it off, wait for a few minutes, turn it on again.
Next step: reset it. Go to Settings - General - Reset - Reset all Settings. You won't lose data, but will have to set up everything again afterwards.
The last possibility you have is to backup your device, then go to Settings - General - Reset - Erase all content and settings, which will remove everything from your device, and restore it from a backup, where you'll have the possibility to agree to terms and conditions in the process.