"True, and grapes are 2.99 a pound at the local grocery store. Doesn't seem to explain why a good dinner table wine can be upwards of $100 a bottle."
While there is an element of perceived value built into the price of a bottle of wine, much more goes into pricing a bottle of wine than the price of grapes.
Different grape varietals can be more or less easy to grow depending on skin thickness, adaptability to different climates, and disease resistance. The pinot noir grape, a notoriously finicky varietal, really only shines in cooler regions and its thin skin makes it highly susceptible to disease. Other grape varietals, like Chardonnay, are highly adaptable to a number of different regions and soil types.
Once harvested, grapes are typically sorted according to quality. The best grapes are used for the best wines. The excess, low-quality harvest is usually used for blending into massive batches of lower quality wine or grape juice or it's thrown into compost to fertilize the next year's crop.
Once the juice from the grapes is pressed and fermented, the wine, depending on type, will either be aged in oak barrels or steel tanks. American Oak Barrels can range in price from $500-$1000 and French Oak Barrels can be double that. If aged in oak, which is typical of many reds and a few whites, the aging can typically take anywhere from a few months to many years.
Once aged, the winemaker will typically select small samples from different barrels and experiment with different blends to get the optimal blend for balance and aging.
All this being said, here's what I learned from working at a smaller winery in Virginia for a year: As a rule of thumb, most of our wines cost about $5-6 per bottle to produce. In the winery, we would sell at retail between $10-30 depending on the type of wine. We would sell at wholesale to restaurants and stores at $8-12/bottle. Stores would typically mark the bottles up to match what we sold the wine at at retail in the winery. Restaurants on the other hand will typically mark up a wine 3-5x what they purchased the wine at to account for corked wine, uncorking fees, storage costs, and of course to make a profit.
So sure, marketing and perception play a big part establishing a market price for wine. (Thus a huge jump in Pinot sales the year after Sideways came out, and a corresponding drop in Merlot sales). But it's also naive to compare the mass-produced Concord or Niagra grapes you're getting at a grocery store to the bottle of wine you're getting at a restaurant.