I think Mr. Gold is double crossing both of them, which is essentially what everyone is saying. That he is working for himself. This is going to be a stretch, but I think that Mr. Gold agreed with Regina to get Emma out of the job. As in, Regina planted the evidence not to make MM’s life miserable and arrest her (but that must have been one of the perks), but to make Emma look bad. Mr. Gold planted the key so that MM will leave and not come back, which would get Emma fired. Like he said in the beginning of the show, if she didn’t find MM, then she can kiss her badge goodbye.
I also think that Mr. Gold will in the end, make both Regina and Emma happy. He will prove MM’s innocence and get Emma fired.