Recently, I had lots of gas, and a loss of appetite. Anything I ate, would cause me to vomit, what might cause this?

Stomach flu. Food poisoning is common. Could be bacterial but less likely provided the symptoms are not severe (fever, diarrhea etc.). Viral gastroenteritis (stomach flu) is, by far, the most common cause of infectious gastroenteritis. Supportive care - blend diet, fluid support, symptomatic treatment for nausea/vomiting may be tried. If worsening or not going away in 3-4 days, seek medical care.
See your doctor. Causes for GI symptoms range from the benign and annoying to the serious and potentially life-threatening. Bottom line - if not improved within a couple days using a light diet and otc preparations it is always prudent to be evaluated by your doctor.