Hi,
Anyone know where this came from and on what it is based?
The standard expression is 'Your goose is cooked', meaning that you are in big trouble. I'd understand 'You've cooked your own goose' to be derived from this, meaning 'You have caused big trouble for yourself'.
If you want to research 'Your goose is cooked', you might also like to look at the common and somewhat similar expression, 'You're a dead duck'.
Best wishes, Clive