Anvil app hosting through Hostgator

have you had a look at the custom domain docs?

Anvil Docs | Choosing URLs

There’s a section on popular domain registrars. Hostgator is not one of the example hosting sites but the work flow won’t be too far off.