Eating high calorie foods would make you gain weight, but I would not recommend devouring any old vegetarian junk food or you might gain weight but health-wise feel lousy.
Are you looking to gain muscle or achieve a certain body type? You did not mention your height or what sort of build/body frame you have, so it's not apparent how much you are looking to gain to be healthy, if that is your concern. Have you been seen by a qualified doctor?
As a vegetarian do you eat eggs, dairy, processed foods?
Avocados, nuts, seeds. Use quinoa along with whole grains. Make nut roasts, cashew spreads. Add ground flaxseeds
Use tahini based dressing on salads and veggies.
How tall are you? Do you feel you need to gain? Are you currently struggling to not lose weight?