This article is from the Star Trek Tech FAQ, by Joshua Bell inexorabletash@hotmail.com with numerous contributions by others.
Yes... sort of. There have been occasions on the show where some
required element cannot be replicated. The Tech Manual talks about
"quantum transformational manipulation", so they can do some quantum
twiddling to get new elements. However, it also says that the energy
costs are high for all forms of replication, and that food, since it's
usually just different arrangements of the same basic things (water,
proteins, lipids), is more practical to replicate from bulk matter
than to store.
In "Night Terrors" [TNG], when a certain substance is needed, Data
says "We no longer have the power to reproduce complex elements in the
replicator." This is evidence for the above.
 
Continue to: