Golden trinkets rerolled by D20 will cause the resulting pickup to have the golden effect applied to it. If this is a trinket, the trinket will turn into a standard trinket, otherwise the gold effect will do nothing and will disappear upon leaving and reentering the room.
Additionally, items spawned by chests with the gold effect applied will be golden as well, however other pickups dropped by chests will not be.
The ID, or more accurately subtype, of a golden trinket is the normal ID + 32768. For example, the ID of Golden Cancer is 32807 (because it normally has an ID of 39).