If you take a look at the crafting recipes on the Terraria wiki, you'll see that the iron armor needs 75 iron bars to craft a full suit, whereas the gold armor needs 90 bars. It is the same for the swords (iron uses 10 bars, gold 13). I haven't checked all items yet, but the only ones that use the same amount of bars are the pickaxes, bows and axes. (but note that the gold pickaxe uses one more wood than the iron)
I have a lil' theory on this: Maybe the player character puts more effort on crafting the gold armor/equipment rather than the iron one; And even if iron is stronger than gold, the gold equipment is better because it was more well-made.