To set Gmail and others (yahoo mail , etc) in Windows 8 or Windows 8.1, first you must have Microsoft account and you have to add it in your Windows mail.
If you don't have, you can register at hotmail.com, live.com, or outlook.com.
The steps :
In Windows 8 or 8.1, choose Mail
Add your Microsoft account if not already
Choose Accounts
Click Add account
Choose the mail you want to add, (example: Gmail)
You will be asked for Gmail username and password ,
And then after a while you will be able to receive and send mail using Windows 8 or 8.1 mail.
If you don't have, you can register at hotmail.com, live.com, or outlook.com.
The steps :
In Windows 8 or 8.1, choose Mail

Add your Microsoft account if not already

If your Microsoft mail account is already active, then you will be able to add Gmail or yahoo mail
Move your mouse cursor to the upper right corner, or bottom right corner.
Then the menu will appear, choose Settings
Choose Accounts
Click Add account
Choose the mail you want to add, (example: Gmail)
You will be asked for Gmail username and password ,
And then after a while you will be able to receive and send mail using Windows 8 or 8.1 mail.