This error might occur if /var/lib/gdm/.ICEauthority file is unwritable because it somehow got owned by the wrong user.
To rectify this:
step1: after the system boots up press CTRL+ALT+F2 to get to terminal login.
step2: log in as a valid username (one of the usernames that would otherwise appear on the gui login screen.)
step3: change to super user.
step4: enter the following command:
> chown gdm:gdm -R /var/lib/gdm
By- Mr. Sumit Kumar
Computer Science Student at IIT Kanpur (INDIA).