Remember, these are the ONLY ways to get gold. Do NOT trust third-party sites that claim to 'hack' gold. They're scams that will steal your account.
1: Marketplace Sales
This is by far the easiest method. All you have to do is create templates and avatars that everyone will enjoy! When an item is purchased, you earn 1 gold, and when an avatar is purchased, you get 14 gold.
2: Bug Reports
This method takes more time to do, but is very rewarding. Upon successfully reporting a bug, you are given a Bug Report Point, the Tester badge on your profile, and 600 gold! When reporting your fifth, you earn 1200 gold, and on reporting your tenth, you earn 2400. When reporting a bug on Live (WWW), you earn 40 gold and one Report Point, while if your bug is on Friends and not Live, you earn 80 gold and two Points. Finding bugs is difficult, but it is very rewarding for both players and developers.
3: Competitions
When there are competitions around, you should grab some friends and have at it! Winners usually earn a badge as well as some gold. Even if you don't win, you can be happy that you made a fantastic game with some fantastic friends!
4: Purchasing Gold Packs
Have some money laying around that you're not going to use? Well, first of all, you should probably save it - but if you don't want to, why not support the developers? Purchasing a gold pack not only gives you gold but some XP as well! You might not care about the leaderboard, but you might want access to all available themes once the update reaches your server! Besides, you're helping the devs stay afloat!