Food allergies/intolerances like gluten and dairy can wreak havoc on your body and tummy! Good for you for exploring this avenue! Paradox is absolutely correct, there are no nutrients that are only found in dairy or gluten products that you will need to worry about missing as long as you have variety in your diet and eat nutrient rich foods. Having said that, enjoy this elimination of some super over-utilized foods to create some variety in your diet. Foods like quinoa, amaranth, buckwheat, steel cut oats (not rolled) and the list goes on and on can be so much tastier than their wheat based buddies. In terms of Dairy free I would just avoid the milk alternatives that are sweetened and I stay away from rice milk due to its naturally high sugar content. Unsweetened Almond, Coconut, Soy, Hemp etc can be good options.
I have been gluten and dairy free for about 13 years now and honestly I probably have a more diverse and balanced diet than I would otherwise. Also, some people can still do whey protein as a lot of food allergies are due to another milk protein called casein, so something to consider.
The basics of gaining on whatever program you use would be the same, just eliminate and substitute the gluten/dairy.