Before worrying about it too much, ask her where she got her scientific information about a gluten sensitive woman eating gluten and it causing a lack of nutrients for the baby. This is not common knowledge, but before insisting that she's crazy, find out if there is any scientific evidence to back it up. Obviously this information would be helpful for future pregnancies as you cannot fix what's happened already. Also talk to your OB/GYN just to double check.
Now, from the surface it would seem like it would be the opposite of what she claims. That skipping gluten would be more of an issue then adding it. Gluten is a protein, but I'm sure you're getting plenty from other sources, so I would not worry about not eating it if you're sensitive to it. You need to do what's best for your body.
When your in your first trimester you tend to eat only what's appealing, and that might just be canned peaches for a few weeks (as in my case). Obviously that's not a great diet, but for a few weeks it didn't cause huge problems with my daughter. Many women eat wild and crazy foods during the first trimester, its normal. I honestly would not worry too much about all of this. I'm sure due to your previous miscarriage you're very worried about it happening again and this was a trigger. You're a good mom and know how to take care of your body and your baby. Eating gluten, even if it made your body upset, was better then not eating during those first few weeks.
Sorry some friends are a bit pushy, especially when they don't feel like you're doing what THEY would choose to do in a particular situation. You might need to have a chat with your friend about appropriate boundaries in this relationship. Like not giving advise unless asked for.
Hope you can put this nagging fear behind you, and it you can't, then pursue finding the research to determine if this is a myth or not. And even if its true what she says, you're past it and you'll know better for the next time, and you're baby is still there and fine as far as you know. Be thankful for the blessings of right now.