The reason why you cannot gain weight is because your gastrointestinal digestion and absorption is weak. Improving digestion and absorption is the key. The nutrients used to improve digestion and absorption are mainly protein (high-quality protein), B complex and carotene. A perfectly nutritious meal will have some effect, but more importantly, you need to know the reason why you are not gaining weight, and pay attention to your diet, rest, etc.
Hope this helps!