How big a tank are we talking about?
This is what a royal Gramma will do. It selects it's hiding place, and that becomes it's home. It will go after almost anything that approaches. So a small docile fish like a yellow gobbie doesn't have much of a chance.
If you have enough room, you could try introducing several fish at once, so the gramma can't go after a single fish. You could also get a fish that is on equal terms with the gramma, something like a spotted hawk.
Another trick is to feed the gramma about all it can eat, and then introduce the yellow gobbie. The gramma may just feel too full to chase anything down.
If you can't get them to live together, my personal choice would be to retuen the golden gobie to the LFS and get something else. I just happen to like royal grammas more. Others might prefer to keep the gobbie.