The 15 GB of free space on a Google Account does not belong to Gmail alone. Gmail, Google Drive and Google Photos all share it, and once it runs out you stop receiving mail, cannot upload files to Drive, and photo backups stop.
On most accounts the culprit is not the number of messages but a handful of very large attachments, old device backups and trash folders that were never emptied. Work through it in the right order and a few gigabytes usually come back within half an hour.
The steps below follow the screen names and search operators published on Google's own support pages. It is worth downloading anything you want to keep before you start deleting, because a permanently deleted message does not come back.