Right. Let us look those words up.
Gueule= mouth, muzzle, face ( informal).
Gueule de bois means face/mouth of wood?!
Now, think of situations when you’ve felt like having a ” wooden” face or a”wooden” mouth… You are right. Hangover. Trop de vin rouge la veille!
Funnily enough, bois also means ” you drink” as in the second person singular of the verb boire= to drink.
This is a pure coincidence though.