I am trying to upgrade my Town Hall to level 5, however, it keeps stating that I need more gold. But when I try to buy more gold it complains I need more storage!
You have to have 150,000 gold to upgrade your town hall to level 5. Now to collect 150,000 gold in your storage, you need to have gold storage upgraded enough to have the capacity of 150,000 gold or more. At town hall level 4, which is your current town hall level, you are allowed to build 2 gold storage. At this level, you can upgrade your storage(s) to level 8 (To upgrade storage, you need elixir). The level 8 storage will have a capacity of 250,000 maximum gold. Having 2 level 8 storage will allow you to have 250,000 x 2 = 500,000 gold capacity.
Now to earn more gold, you need to have higher level of GOLD MINES, or you could simply go and raid other players thereby collecting more resources a lot quickly.
Hope this helps.