I can't think of anyway to use gold properly. It is quite weak if it's used for tools or armour, and because of its rarity, I'd rather not used it for stuff like that. I'm also not really into decoration, so just a gold wall won't really be the answer I'm looking for! Is gold just useless or is there something that only can be made with gold?
I use my gold for enchanted items that I don't use a lot like silk touch shovels for when I need grass blocks. Gold tools mine faster than any other tool and also have the highest chance of good enchantments.
Having clocks around your base can help you if your base is underground
Other items that you are able to craft using gold are golden apples, these give you a nice buff but cost quite a lot. also the golden carrots that can be used for breeding rabbits, taming horses or making nightvision potions.
The "best use" for gold is fairly subjective, but there are a bunch of things that can only be made with gold:
Weighted Pressure Plate (Light) - Gives an analog redstone signal that is equal to the number of entities on it (max 15).
Powered Rail - Increases the speed of minecarts that go over it when it's powered with redstone
Clock - Shows the time of day
Golden Apple - Gives regeneration and absorption potion effects when eaten, 2.4 nourishment value
Golden Carrot - Used for making night vision potions, 2.4 nourishment value when eaten
Glistering Melon - Used for making instant health potions
Gold can also sometimes be traded with villagers for other items, and weapons/armor made of gold have a higher "enchantibility" (better chance of getting good enchantments) than any other material.
You can make Mojang banner with enchanted golden apple.
This is only for decorations this will not help you in singleplayer but if you play multyplayer much servers have shops where you can sell banners or trade to another player.
You can use gold for beacon too if you have much.
There's indeed not that much use for gold in minecraft, other than for decorative purposes because it's "shiny". This can be seen as an interesting similarity to the real world, where the primary use of gold is also for its "shiny" decorative effects, having turned it into somewhat of a "currency for currency's sake" over the history of humanity and its strive for gold.
However, even in reality it has indeed won a bit more practical significance in modern days due to its usage in electronic components (and other technological purposes). And this again relates back to Minecraft, where gold can be used in a few select Redstone components, like clocks, but their usefulness still depends on your personal playing style and you usually don't need them in overabundance. The most important of these being powered rail, which is needed whenever you need a minecart to drive automatically without a downward slope. So whenever you built a piece of rail and want it to be bidirectional, you need powered rail. And seeing how you get effectively 1 powered rail per gold bar, this can get quite gold intensive.
Then there are special food items and ingredients, like golden apples, golden carrots or glistering melons whose use again depends on your personal playing style. Those can gain you some interesting effects by eating or brewing with them, but nothing that is particularly essential for gameplay or can't be downright ignored.
So on the bottom line, the thing that is most likely to eat up your gold resources depends on your playing style. If you enjoy a more construction oriented game, you'd be more likely to spend most of your gold on powered rails, but of course this also depends on if you build much railway in the first place. If you enjoy a more exploration and fighting oriented game, you might want to use the effects of golden apples, carrots and melons more often.
Enough has changed in Minecraft that this question deserves a new answer now. See the previous answers most of the useful things you can craft with gold, I will not repeat those here. Instead I will focus on the things added in the 1.16 Nether update, as well as a few points which I feel were not covered well enough before.
The trade mechanics and options have changed considerably in Minecraft over the years, but gold has always been something you could trade with Villagers for emeralds. The emeralds can then be use to buy many other useful things from villagers.
Before Java Edition version 1.8 of Minecraft, all villager could offer to buy gold, although typically this was a rare trade and was the last one acquired. Priests were the most likely to buy gold (ignoring the green clothed villagers which could not spawn naturally) with a ~10% probability of getting that trade.
From version 1.8 up to and including 1.13, the priest was the only villager who would buy gold.
From version 1.14 (the "Village & Pillage" update) onward, Apprentice Clerics will buy gold. The apprentice level is the second trading level, and is easy enough to obtain by selling rotten flesh to a Novice Cleric or buying redstone dust until they level up.
Gold blocks can be used to create some or all of the pyramid underneath a beacon. A single-level pyramid is needed just to active a beacon, with additional levels granting more powers and greater ranges. The maximum level of four requires 1476 resources (iron, gold, emeralds, diamonds, and/or netherite), so this is a great use for gold after defeating the Wither to help fill in your beacon pyramid, or to extend it for a mutli-beacon setup. You can mix blocks of different resources when creating the pyramid, so even if you have lots of iron already, the gold can still help.
Starting with Minecraft 1.16, gold has taken on new value. The Piglin mobs found in the Nether are normally hostile to the player and can be very dangerous since they deal up to 6 full hearts of damage per attack with a sword, or 2 full hearts with a crossbow, and can group up on the player similar to zombie pigmen. However, if you are wearing at least one piece of golden armour when you approach them, they will not attack you unless provoked. This is very helpful and it is a good idea to always have one piece of gold on when exploring in the nether just in case you run into a group. Replacing the helmet or boots with a golden helmet or golden boots makes sense because they have the least amount of protection to begin with, and thus they won't reduce your total armour defence points as much when replacing better armour.
Piglins can also be bartered with, and they are only interested in gold. If you drop gold in front of them, they will pick it up, hold it for a few seconds, then give you a different item in exchange. This can be repeated for more items as long as you have more gold ingots. You can see a full list of things Piglins can drop on the wiki, but perhaps the most useful drops are the enchanted book with soul speed and crying obsidian, which can only be found elsewhere in rare generated structures (bastion remnants and ruined portals respectively). They also drop fire resistance potions which an be useful for exploring the nether, and ender pearls which can be useful for locating strongholds and activating end portals.
Gold is required to craft netherite ingots like so (shape does not matter):
Netherite ingots are capable of making netherite tier tools, weapons, and armour. This is currently the best tier in the game with the better durability than diamond and fire-resistance. However the challenge is usually finding the netherite scraps also needed for the recipe, not the gold ingots.
In this situation the most useful items look to be Glistering Melon, used for Potions of Healing; Golden Apples, which provide some useful buffs; and Golden Carrots, which can be used for horse and rabbit breeding or for Potions of Night Vision. Other items you might find useful are Powered Rails and Clocks.
Well, I think that the best use is to craft gold blocks, which you can then use to craft Enchanted Golden Apples (By placing an apple in the middle of a 3*3 grid and filling the rest of the grid with the blocks). An Enchanted Golden Apple (Notch Apple) gives you the Resistance (reduces damage) and Fire Resistance (makes you immune to fire and lava) both for 5 minutes. Also you'll receive the Regeneration 5 (heals you very fast; possibly 3.33 half-hearts per second) for 30 seconds and absorption, that gives you 2 additional (yellow) hearts to your health bar, that cannot be healed, for 90 seconds. So, it is extremely useful to eat one in difficult battles, such as an army of angered zombie pigmen or the wither. (Also written in other answers) Other important uses may be for beacons and powered rails.