Gmail is not available as a self-hosted solution but there are a few alternatives for power users and business that want to host a solution on-premise. The best Self-Hosted WebMail Provider alternative is Forward Email, which is both free and Open Source. If that doesn't suit you, our users have ranked more than 50 alternatives to Gmail and four of them are WebMail Providers available as a self-hosted solution so hopefully you can find a suitable replacement. Other interesting Self-Hosted WebMail Provider alternatives to Gmail are Zero Email, Webmail Lite and Horde.
I might be missing something, but Zero Email requires you to have a google account/email to use. This is not a replacement.