Just to be sure I understand ... you are accessing your Gmail account using Safari, not the Apple Mail app ... correct?
If so, when you try accessing it, that is when you are seeing this "HTTP 400 Bad Request" error message ... correct?
A "400" code would indicate that the Gmail server could not "understand" the request coming from Safari due a syntax error. Basically something got jumbled up, either at the source (Safari), its transmission (over the Internet), or at the server end.
Let's start with, do you use any of the following on your Mac:
- Software firewalls?
- Anti-virus apps?
- VPNs?
Have you tried any/all of the following:
- Deleted the Safari cache?
- Restarted your Mac?
- Restarted your network router?
- Tried accessing your Gmail account from a different web browser? From the Apple Mail app?