Electronics didn't exist for the thousands of years that gold was used as currency. The fact is, it only has most of the value that it does because it was rare, malleable, particularly shiny, and because metallism was simply the easiest way (or at least one of the easiest ways) to invent the concept of currency and a monetary system.