I don’t think you need anything on the Internet with ESPHome unless you write something in to talk to the internet, it’s all managed on the local network.
The “gateway” is used by network devices to access hosts external to the device’s subnet, i.e., on the internet.
Home networks typically have one subnet for everything, including computers, IoT devices, and servers like Home Assistant. So the lack of gateway configuration should not block the access to Home Assistant.