When a nutritionist suggested I give up gluten early this year, I was horrified. No bread, no doughnuts, no pizza? No way. But after a few months of continuing to feel awful, I decided to give it a try. I braved the specialty foods aisle at the grocery store to stock up and found myself horrified again -- this time by the prices.

It wasn't my first exposure to the high cost of healthy eating. I had the same experience when I first started buying organic foods. Over time, I've learned some tricks to saving on organic items, and I've started applying those tips to my gluten-free shopping as well.

The good news is that as the popularity of organic, vegan, gluten-free, and other nontraditional foods grows, the more products become available. More competition means better quality and, over time, lower prices. In the meantime, here are some ways to save.

Comparison-shop
Don't assume specialty stores like Whole Foods (WFM) are always a ripoff. Because they sell high volumes of organic meat, produce, and other staples, they can sometimes negotiate better deals with suppliers. As shown in the chart below, Whole Foods beat out my local grocery chain on three out of four items!

As with any purchase, it pays to compare prices on items you buy often. Sign up for your store's weekly newsletters and watch for special offers on your favorites.

For nonperishables, Amazon.com (AMZN -1.11%) is a surprising source of savings -- especially if you're willing to buy in bulk -- and offers a decent selection of organic and gluten-free packaged goods. Amazon won or tied on all four of the items below.

Sign up for the Subscribe & Save program and you'll get an additional discount (you can pause or end your subscription at any time). Amazon is especially helpful for those who live in more rural areas, where grocery stores may not stock many specialty items.

Here's a sample of how prices vary on a handful of randomly chosen organic and gluten-free items.

Product

Giant

Whole Foods

Amazon

Annie's Homegrown Gluten-Free Mac & Cheese (6-ounce box)

$3.59 ($0.60/ounce)

$3.49 ($0.58/ounce)

$29.18 for a pack of 12 with Subscribe & Save discount ($0.41/ounce)

Kashi Organic Promise Cinnamon Harvest cereal (16.3-ounce box)

$3.99 ($0.25/ounce)

$3.69 ($0.23/ounce)

$16.05 for a pack of 4 with Subscribe & Save discount ($0.23/ounce)

Bob's Red Mill All Purpose Gluten-Free Flour (22-ounce bag)

$4.39 ($0.20/ounce)

$3.99 ($0.18/ounce)

$14.40 for a pack of 4 with Subscribe & Save discount ($0.16/ounce)

Ancient Harvest Quinoa Spaghetti (8-ounce box)

$2.99 ($0.37/ounce)

$4.49 ($0.56/ounce)

$36.31 for a pack of 12 boxes ($0.38/ounce)

Don't rule out the warehouses, either. Both Costco (COST -0.11%) and Sam's Club have gotten on the healthy food bandwagon over the past few years. As each location offers different items, you'll have to check your local store for specific savings.

My Washington, D.C.-area Costco sells a wide variety of organic foods and a decent selection of gluten-free items as well. They aren't always cheaper, though, so just as with the stores above, it really pays to shop around.

Think outside the big-box store
Farmers' markets, CSAs, and co-ops can all be good sources for organic produce, dairy, eggs, meat, and more. Often, the cost is on par with your grocery store, but there may be a broader variety of items available, and you can feel good knowing you're supporting local farmers.

Many CSAs even deliver, and if you are savvy about using up your weekly bounty, you can save money and enjoy superior produce. My local CSA costs about $30 a week for a large box of seasonal produce (enough for a family of four), delivered to my door. That also includes free "U Pick" days at the farm when we can forage for even more fresh fruits and veggies ourselves. Just confirm that the farm you choose is Certified Organic. You can find a CSA near you at localharvest.org.

Prioritize
If your budget just won't stretch to cover all organic items, simply prioritize. Many experts advocate buying organic meat and dairy products, along with the Environmental Working Group's "dirty dozen" produce items (here's a handy printable wallet card). These are the most likely to be exposed to pesticides. (On the flip side, it's safe to skip organic versions of the EWG's "Clean 15.") If you focus your spending on those, you're off to a good start.

A little more room in the budget? Add organic cereals, peanut butter, and ketchup to the list and stock up when they're on sale. Store brands offer good value here -- for example, Giant's generic Nature's Promise brand of organic ketchup costs only $0.12 per ounce, half the price of Heinz's organic offering.

Do it yourself
If you've got the time and interest, you can save a ton by skipping convenience foods and making your own. I am not an accomplished cook, but even I've been successful making my own inexpensive organic Greek yogurt, ice cream, granola, and popsicles, and the kids have been begging to have my gluten-free brownies and peanut butter cookies in their lunchboxes instead of store-bought treats.

You can take it even further by blending your own baking mixes (especially good for the gluten-free crowd, as store-bought blends often contain traces of gluten), growing some of your own produce and herbs, and learning how to preserve cheaper in-season organic produce for the winter months when prices shoot up. To urbanites like me, it may sound extreme, but it can also be fun and, just as important, financially rewarding.

Rethink your diet
Ultimately, this was the best solution for me. Rather than continue to fill my cart with gluten-free versions of my old favorites, I've challenged myself to find new recipes using foods that are naturally gluten-free. Sure, I still buy some specialty items, like my beloved pizza (psst...Bob's Red Mill makes the best gluten-free pizza dough!), but I have enjoyed finding new favorites, too.