http://mygateway.gateway/gateway.lp

With my ADSL modem, how is 'http://mygateway.gateway/gateway.lp' associated with the IP address of the device?

And is it possible to associate a custom URL to the IP address of a device on the local network?

If so how do you do it?

Possibly its done using Bonjour There is an arduino implementation at GitHub - arduino-libraries/ArduinoMDNS: mDNS Library for Arduino but I've not used it.

Found another way actually - put an entry in C:\Windows\system32\drivers\etc\hosts file.
Android has a similar hosts file and there are apps available to edit this, except that your android phone needs to be rooted.