As good as gold
Well-behaved and obedient.
'As X as Y' similes usually compare someone or something with some property of an item that is well-known to exhibit that property; for example:
Her dress was as white as snow.
Alike as two peas in a pod.
In this case things are a little different.
Gold isn't well-known to be either well-behaved or obedient. Here 'good' means genuine, not counterfeit.
When banknotes (known as bills in the USA and some other countries) were first introduced they weren't considered to be money in the sense we now think of them, but were promissory notes or IOUs. Gold or silver was real money as it had intrinsic value, whereas notes were just promises to pay in coin. UK banknotes, like those of many other countries, still include messages such as this, signed by the Chief Cashier of the Bank of England: 'I promise to pay the bearer on demand the sum of ten pounds'.
So, 'as good as gold' ought really to be 'as genuine as gold', but the more usual meaning of 'good' has taken precedence over the years and left us with the usual meaning of the phrase. The original meaning is recorded in this piece from The Old Bailey records of a trial in October 1827, reported that month in The Morning Post:
Child and the others then went with him to another house in Chancery Lane; they there gave him a paper, which they said was "as good as gold", and would be paid on Monday next.
The phrase is used several times in literature in the following years. The change from the use of 'good', as meaning 'genuine' to 'good', as meaning 'well-behaved' didn't take long. Charles Dickens used it in the latter sense in A Christmas Carol, 1843:
"And how did little Tim behave?" asked Mrs. Cratchit...
"As good as gold," said Bob, "and better.
See other 'as x as y similes'.