My 6 mo old son is not gaining weight. He spits up frequently, could this be a possibly cause?

Yes. Weight gain is a "vital sign" for infants. Poor weight gain should be evaluated by your doctor. While reflux can cause poor weight gain, it's only one of many factors to be considered. My friendly advice: remember to keep an open mind. A good doctor will often follow your leads, at least initially. Over-emphasizing any one hunch may lead down the wrong path, and could end up delaying diagnosis.
Yes. If a 6 month old is spitting up frequently and not gaining weight adequately, the spitting up can indeed lead to the poor weight gain. The baby may not be getting enough calories because he vomits part of each meal. The doctor can evaluate to find out why the baby spits up. The reason could be gastroesophageal reflux, some partial obstruction; a chemical, metabolic, neurological problem, etc...
Yes. It is possible that he is spitting up so much that he is not taking in enough calories. It is also possible that it hurts to eat, so he limits his intake. Food allergies could be a cause of spitting up, and also affect absorption from the gut if it is inflamed. Discuss these issues with your pediatrician!