If they are "too far off", it might cause problems with certificates – which then either appear "not yet valid" (with your date too far in the past), or "no longer valid" (with your date too far in the future). Most Google components such as Playstore, Gmail, Sync, use secure communications, and thus rely on certificates.
Especially with Custom ROMs or on rooted devices in general, the file might have been altered. Some "ROM cooks" add the IP for Google's servers here "to speed things up" (avoiding "lookup overhead") – with the side effect being things break when those servers are "relocated".
So in that file, there might be multiple entries you need to comment out or remove (check first if that's the case – if not, you can save yourself the trouble). Leave only the local host entry as is. You'll need to remount the system partition read/write to modify this file--, which requires root access. This can be done either via
adb shell from your computer, or with a terminal app directly on the device:
$ cat /system/etc/hosts # first check if the work below needs to be done. If so:
# mount -o remount,rw /system
# cd /system/etc
# cp hosts hosts.bak
# echo "127.0.0.1 localhost" > hosts
Now see if it works again. If not, you can always restore your original
hosts file (note we copied it to
hosts.bak). When done, don't forget to remount
/system read/write again – either by a reboot, or with
mount -o remount,ro /system.