There are other things that affect price, including consumer demand. But cost is absolutely a factor. Saying "the cost is what people are willing to pay" is a tautology and not very useful.
http://www.sanandres.esc.edu.ar/secondary/economics%20packs/...