It depends. The expense for special food that is prescribed to you may qualify as a medical expense. But, only to the extent the cost exceeds a similar food that is not gluten-free. If you can say that the special food is primarily to alleviate or prevent a physical or mental disability or illness, it qualifies. Medical expenses don't include expenses that are merely beneficial to general health, such as vitamins.
You must itemize your deductions to claim medical expenses. Also, medical expenses are only deductible for the amount in excess of 7.5% of your AGI. For example, if your AGI is $50,000, only your medical expenses over $3,750 can be claimed as an itemized deduction.
Refer to IRS Publication 502 for more information.