You will likely have noticed that when clicking on a project, sometimes it costs only Resources (Metal/Oil/Thorium) and sometimes it shows both Resources and Gold in the cost. What's all that about?
If you have enough Resources to complete a project, you will only see the Resource cost. Completing this project will only use said Resources, and only the amount shown.
If you don't have enough of the required Resources to complete a project, you will see Gold incorporated into the cost. This Gold amount will fluctuate depending on how much of the given Resources you're missing out of the total required. The more Resources you're short - the more Gold you have to spend. If you choose to complete a project when you don't have enough of the needed Resources, then the project will use all the of required Resources you do have available, and the Gold amount listed will cover the remainder.
Using Gold is not required for projects; you can still wait until you have enough of the required Resource(s) to get started. But if you don't have enough, and are looking to get something done immediately, Gold is a good way to help you hurry things along.