You can simply use that gmail based AppleID to make an iCloud account. Just sign into iCloud on any Apple device you own with that existing AppleID. You’ll be walked theough the steps to make an @icloud.com email address and set up the iCloud account based on that existing AppleID. In that case, both the gmail primary email and the iCloud email will be synonymous logins to the same AppleID and all the same data.
E.G. my AppleID uses my own domain email as the primary email address. That is the AppleID I used to make an iCloud account with (and thus which also transferred my older @me.com address to the same iCloud account). I can use either my own domain email address, my iCloud email address or my @me.com email address to login to the one and the same AppleID. All three emails are synonymous logins to my one and only AppleID, and thus the same data.