Gmail on browser lets you directly paste clipboard images these days - but I have had this bug a couple of times now on Mac where I take a screen grab but trying to paste, it pastes the text I copied previously.
I can paste the image into other applications so it definitely is in the clipboard, but something is getting screwed up. I have no idea what I did to fix it previously.
I have found that restarting Chrome seems to fix it, and that when the bug occurs I cannot paste clipboard images into SuperUser either. So I suspect it is a Chrome/MacOS issue not Gmail.