They have copied an old version of the GMail page and set it up as their own. When you enter any details, they are forwarded to the owners of the site, then the page redirects you to the real GMail homepage.
What they gain is thousands of GMail addresses and passwords. As most people don't seem to understand security, they will have used the same password for their GMail account as well as lots of other sites. Your email address and password would get them into a lot of sites! Directly, they gain your GMail details. Indirectly, potential access to all your accounts on shopping websites, and from that, your bank details.
There was another similar thing going on with the G-Archiver software to back up your GMail account. Take a look at
this post by Jeff Atwood.