Unfortunately allergies can have different symptoms in different people. Gassiness can certainly be caused by an allergy and in an infant dairy is the most common culprit, but allergies can be to anything. It coul also be an intolerance and something that will be outgrown soon.
The most reliable way to tell is eliminate dairy for three weeks. If your baby's symptoms don't change then that wasn't it and you can have dairy again. If your baby seems to feel better within three weeks then try dairy again and see if the symptoms come back. If they do, then you know something.
Elimination diets are really hard, but if they make your baby feel better they are SO worth it. And if you decide to stick with it, it gets much much easier. I know what I'm talking about because I've been nursing an allergic baby for 21 months now and I thought I might go nuts for awhile, but things have gotton much better.
Good Luck, I hope your dd feels better!
Edited to ask: how do you know she has a viral infection and the congestion isn't an allergic symptom?
Pauli and Kelsey (nursing with allergies to egg, milk, wheat, rice, beef, pork, potato, pear and tomato and also no nuts or seafood)