To gild something is to cover it with a thin layer of gold.
Because a lily is already in a state of natural perfection, gilding it would only be excessive.
The expression is a misquote from Shakespeare’s King John, during which the king’s barons describe his second redundant coronation,
“As throwing perfume on the violet or to gild refined gold to paint on the Lily.”