In PvP, you earn gold by defeating other players and taking their items. The catch is that it works both ways: if you're the one who falls in battle, your opponent gets the gold through the same method.
So the key is to win your fights and protect what you've collected.