Whonix-Gateway has limited connectivity (by design). Its job is to get Tor running, and then to route all traffic over Tor.
If you’re trying to connect to an SSH tunnel before Tor (user -> ssh -> tor -> internet), then the documentation that @0brand linked is incomplete.
Many steps are required to bypass Gateway’s protections. If you’re willing to work at it, you can get some ideas by looking at the VPN documentation: https://www.whonix.org/wiki/Tunnels/Connecting_to_a_VPN_before_Tor#Inside_Whonix-Gateway
Since you’re using Qubes, a more straightforward approach would be to use a proxyVM in front of sys-whonix:
sys-net — ssh-proxyVM — sys-whonix — anon-whonix
Again, you can look at Qubes VPN documentation to see a similar config.