If you no problem connecting to your VDI from office internal network (LAN) and having problem only with remote connectivity (outside of office), the issue could be with the Horizon firewall ports getting blocked. It depends on how you establish connectivity to your office (Proxy, or VPN, etc).
If you use VPN, check all the necessary firewall ports are allowed for Horizon: https://docs.vmware.com/en/VMware-Horizon-7/7.1/com.vmware.horizon-client-agent.security.doc/GUID-52807839-6BB0-4727-A9C7-EA73DE61ADAB.html
Also, if you use Security Server or Access Point or UAG to connect to your VDI from remote networks, then check all the necessary firewall ports are allowed for Horizon end to end (VDI VLAN, UAG, Connection Servers, etc. for ports 443, 4172, 8443, etc.
Thanks for your reply.
Will you please let me know, how to check the firewall port in my laptop, as i am not aware of this.
As soon as i submitted my user name and password, the horizon client is trying to establish the connection and throwing this error.