Ok, super simple explanation: Your gateway IP is used to send traffic to the box from the gateway at the datacenter. The gateway is used to point traffic to the right box coming from the outside world into the DC.
DNS is Domain Name Server. DNS turns URLs into IPs. So if I type 'www.cpanel.net' into my browser, it connects to a DNS server (most likely my ISP's) and that server translates the domain name into an IP address for me. I then connect via the IP and my browser makes the request for the document that is the domain 'www.cpanel.net'.
On cPanel machines we use the DNS server program called BIND. When requests come in from the outside world to our machines, it's BIND that translates them into IPs. If the IP falls on our server and happens to be port 80 then it's handled by Apache - our webserver.
So, you're right. Your hostname should be set to your main IP address. Your DNS is assigned through WHM by doing "Nameserver IPs" in the "Networking Setup" section.
You set up your DNS at your registrar for your domain by creating records pointing to your server IPs. In cPanel on your server you need to also setup the DNS records within the domain zone so that queries on that domain will lead people to your server. There is a button for "Setting up A Records" for your nameservers.
Think that's it. Of course this is from memory and I am assigning Fantasy Football players at this moment so I'm sure I might have forgotten something.

It's complicated, and I probably didn't explain it the best way possible. But the process is usually like this:
1. Choose a domain you own that you would like to setup your hostname on, call it 'domain.tld'.
2. Setup the hostname on the box as 'sometext.domain.tld', either at first WHM setup or using the "Hostname" link in the "Network Setup" section. Create an A Record.
3. On the box, assign IPs to Bind using the "Nameserver IPs" link in the "Networking Setup" section. Create A Records.
4. At your registrar for that domain, set up DNS Host Summary pointers to your server, usually as ns1.domain.tld and ns2.domain.tld and use the nameserver IPs that were just assigned. Sometimes you need their help, depending on your registrar.
5. Wait 24 hrs and check to see if typing your hostname into a browser takes you to your server. If not, try running some tests like traceroute from another box (or tracert from the Windows DOS box) and see what errors you encounter.