This question already has an answer here:
MySQL error 2006: mysql server has gone away
MySQL itself cannot have done, since you weren't able to contact the server and it is therefore entirely unaware of your
INSERT statement in the first instance.
However, whatever client you're using may well be retrying. Since you didn't tell us what that is, it's impossible to say.