In Red Dead Redemption 2's Online, there is both the regular cash currency and the premium gold bars currency. If I wanted to earn gold bars, how would I do that? Is there also a way to purchase them with real world money?
As stated in the comments, Gold bars aren't purchasable yet. However, you can earn them by completing story missions and participating in group missions/activities. You'll notice that the counter for gold bars aren't whole numbers either. You will earn small amounts of a full bar based on what you're awarded in the mission (though there may be missions that award full bars, This i am unsure of). Cheers!
Since a few weeks you are able to purchase in-game gold in the Red Dead Online - Store with real time currency.
For what I've seen yesterday, you can buy 25 gold bars for €10,-
If you want to earn gold with in-game missions, start playing games like Gun Rush or Show Down games. Doing Stranger missions will earn you some bucks too.
Selling hunted animals will only get you dollars, no gold at all.