If we are using DHCP and to receive a response, the node should be in the same link as the DHCP server?
Yes and no - something in the link-layer broadcast domain must be able to handle the request. But that doesn't mean it needs to be the DHCP server itself - lots of networking equipment has the ability to act as a relay agent, catching the broadcasted request and forwarding it on via unicast to a configured DHCP server.
In the same way, the IP gateway for a sub net should be in the same DHCP server?
I'm not quite sure what you're asking here - do you mean that the DHCP server must be the same device as the gateway? (It doesn't need to be.) Or do you mean that the default gateway for the subnet must be in the same broadcast domain as the subnet's clients? (Yes, the gateway must be in the broadcast domain, unlike the DHCP server.)