ODBC connection with RD Gateway here at my company, we use an RD Gateway server.
that means when we want to access a server we have to set up the gateway in the connection...something like rdsgw.mycompany.com

But, how could I do an ODBC connection with my SQL Server if I have to use the gateway?
I'm not an RD Gateway Expert, but I think you don't have to and you can't use the RD Gateway Server for Database Connections through ODBC. 
If you want to access an SQL Server from Outside, you will be better with a VPN Server.

The RAS Gateway could fit your needs -> https://docs.microsoft.com/en-us/windows-server/remote/remote-access/ras-gateway/ras-gateway). 

Alternativly, you can connect with RDP through your RD Gateway Server to a RDP Server inside your company and start your application with the ODBC connection.

Best Regards,
Björn