Exact steps depend on the model you are adding. You can find links in the guide below. What model of MyQ gateway are you using?
If you are seeing a message saying the Gateway is offline, that means it cannot currently connect to the internet. It would need to be connected to your wifi (or plugged into the router if 828LM)