Hello there kdeepak1984,
From what you describe it seems to me that the settings on the network itself at work ar what is causing an issue with your connection to your GMail account. Since it works at your home network without issue, that tells me your settings and software on the computer are setup and operating as they should be. So the most likely answer is that a port is being blocked on the work network, preventing a connection to the SMTP server. If possible, you may be able to give the information about port blocking from the following article to the network admin at work to help resolve the issue:
OS X Mail: Troubleshooting sending and receiving email messages
Third-party firewall software, such as Little Snitch or Symantec Norton Personal Firewall, could be blocking the necessary ports. If such software is installed, make sure the firewall is not blocking these ports:
- ports 25, 465, and 587 (for sending email via SMTP)
- ports 143 and 993 (if you use IMAP email)
- ports 110 and 995 (if you use POP email)
If you're not sure how to enable the correct ports, try disabling the third-party firewall completely, then test for the Mail issue. Note: The Mac OS X v10.6 firewall does not interfere with ports needed to send email.
Check for Internet Service Provider port blocking
Your Internet Service Provider may be blocking the SMTP ports needed to send email.
You can use Apple's MobileMe service to find out if your Internet Service Provider is blocking the sending email protocol SMTP:
- Open Network Utility.
- Click the "Port Scan" tab.
- Enter "smtp.me.com" in the "Enter an Internet or IP address to scan for open ports" field.
- Enable "Only test ports between _ and _", and enter 25 for both port fields.
- Click "Scan" to test.
If you do not see "Open TCP Port: 25 smtp", contact your Internet Service Provider or visit their support website for further assistance. If you do see "Open TCP Port: 25 smtp", your Internet Service Provider is not blocking the SMTP ports needed to send email. Go to the "'Trying to log in to this (email server provider name) account failed…' message or any other error message appears" section below if the email issue persists.

Thank you for using Apple Support Communities.
All the best,
Sterling