It can be the same issue I had
First, go to tty3 (Ctrl+Alt+F3) and login
sudo adduser test
Go back in the login shell and try to log as the test user. It may be useful to know if it is user dependent.
Here few fix you can try on tty3 (and don't forget if there's something usefull on .xsession-errors file in ~/ and edit your question with it)
In ~/, run
ls -lah | grep -i Xauthority
If .Xauthority permission are'nt yours, resolve it with sudo chown username:username .Xauthority
ls -lah /tmp
you should get that line
drwxrwxrwt 22 root root 132K May 25 13:07 .
If you get anything else that drwxrwxrwt, here's your issue and you need to run sudo chmod 1777 /tmp
Make sure you're connected to the internet (ping 8.8.8.8)
sudo apt install lightdm and reboot on lightdm.
Once logged your session, sudo apt --configure gdm3. In my case, it didn't work so I made lightdm, then choose gdm3 in the menu. It's just a workaround. You might also try to purge gdm3 and install it back, as I did.
In my case, gdm3 still was broken, althought I could log in the test user... I didn't find how, and I still use lightdm instead. You would be kind if you update your question with every piece of information so that it'll help every users in that situation (including me :p ).