My phone gut stuck signing in with g-mail
The only solution left to you is flashing the phone with a stock firmware using Odin (on Windows) or Heimdall (on Mac).

EDIT:


Download the firmware from here(may need a registration)
Unzip it
Download Odin from here
Power down the phone, press volume down + home button + power button simultaneously
A menu should appear, press volume up button
Open Odin
Now connect the phone to the computer, you should see COM in blue (1), meaning the phone has been recognised. 

If not, install drivers which can be downloaded from here - Download Kies and install it, will also install all drivers.
Click on AP (newer Odin version)  or PDA (for lower Odin version) and browse to the extracted firmware folder. (2)
Click on Start and wait till the end (3)