I hope you've filed a bug report on this.
What happens for me (Mail 7.2 on OS X 10.9.2) is that the mailbox disappears from under "ON MY MAC", and where the "All Mail (Gmail)" mailbox used to be, you now have a folder named "Archive" that includes three mailboxes, named "On My Mac", "All Mail (Gmail)", and "On My Mac". The two "On My Mac" mailboxes are copies of the original mailbox, the one you renamed).
Fortunately, the damage can be (apparently) undone by deleting either of the copies of it. The other one goes away and "All Mail (Gmail)" returns to its rightful place.