Can't connect to Gmail on stock email app using WiFi (works on mobile data)
As usual, I found the culprit minutes after posting this question when I battled with this problem for a week:

I use DNS66 for ad-blocking. Adding the email app to the exceptions and restarting the service solved the problem.