In Act III, scene ii, of The Merchant of Venice, Bassanio is about to make his choice of caskets so that he fulfills Portia's father's demands. He is no longer self-serving and is determined to make the right choice. He is carefully considering the importance of the material with which the caskets are made.
"Look on beauty,/ And you shall see 'tis purchas'd by the weight;..." Bassanio is aware that people are impressed by material possessions and he does not want to make the same mistake. . Gold is sold by weight and he is comparing this to beauty because a woman's marriage potential, in Shakespeare's day, was often measured according to her dowry and what her father was prepared to offer the husband whether it be land, wealth or property perhaps so that the husband could benefit. A profitable marriage then makes the marriage more appealing and therefore the potential wife appears more beautiful or at least worth marrying.
"Which therein works a miracle in nature,..." The miracle to which Bassanio refers is that of make-up and how it is able to mask a person's real complexion. What he sees on the outside- in this instance, the gold casket- almost certainly masks what the casket really holds. The casket may look appealing but...
"Making them lightest that wear most of it:..."A pale complexion was preferred in Elizabethan England and, with the best make-up, a woman could be made to look "lightest." This would make her highly desirable as a wife. The gold casket looks like the best choice but is it? This is the question Bassanio is asking himself.
So are those crisped snaky golden locks..../ The skull that bred them in the sepulche..." Bassanio continues to question the almost deceitful nature of beauty as even "golden locks" of hair are often wigs, made from human hair of someone who is now dead and buried.
Thus ornament is but the guiled shore/ To a most dangerous sea..." A man can be misled by pretty things much like a hidden shoreline which unknowingly leads into potentially treacherous waters.
"Veiling an Indian beauty..." A veil may hide far more than a beautiful and modest woman just as the gold casket may hide an undesirable fate for whomever opens it.
The seeming truth which cunning times put on/ To entrap the wisest..." So many things ensure that even a wise man is misled by apparent beauty. Bassanio deduces that the gold casket may be hiding its true value and choosing it could be disastrous.
..."Hard food for Midas..." Midas was the mythical king who learnt his lesson the hard way when he unwittingly turned his daughter into a gold statue; all because of his love of gold.
Bassanio now recognizes how gold is just extravagant and "gaudy" and he realizes that choosing it would be a mistake.