most issues when joining a Domain are related to DNS. You need to ensure that DNS is properly working, e.g. you need to be able to resolve the Domain Controllers FQDN on Web Gateway forward and backwards. In many cases this is causing problems. To quickly test, you can add the Domain Controller into the /etc/hosts file on MWG (can be done via the GUI).
In my Lab for example my domain is "mcafee.local". My DCs are called pdc and bdc. In MWG I have to specify "mcafee.local" as the domain name, and add pdc.mcafee.local and bdc.mcafee.local as the Domain Controllers (do NOT specify IP addresses here!).
On the MWG CLI if I ping pdc.mcafee.local I see the IP address of my DC and - the other way round - if I resolve the IP I get the FQDN back. This is really important.
Additionally you may want to check if there are any restrictions for the computer account MWG creates. It needs to set and change a password on a regular basis, maybe this is not allowed due to group policies.
I would check DNS first. Most likely this will already help.
You were right! I did not know that IP addresses were not allowed to be use as the Domain Controllers address.
I have not done any other changes both on the MWG and on the AD.