Yes, junk foods are number one contributors when it comes to weight gain. That's exactly what they do, nothing more and nothing less. They are called junk foods simply because they add nothing to the body when consumed, but instead contribute to the sum total of the problems the body have.
Basically, junk foods are unhealthy to the body because they are not only making one to become over weight, but they also have the propensity of clogging blood vessels such as arteries and veins, thereby making them unable to transport important bodily materials needed for essential body functioning. And it doesn't just stop there, due to this blood vessel blockage caused by them, humans become highly predisposed to various forms of diseases such as artheroscloresis, stroke, plaques, cardiovascular diseases, and many more.
Furthermore, the reason junk foods cause these several conditions is as a result of what they are made up of. Specifically, they are packed with trans fats that are highly saturated, which are in greasy forms. When eaten, they add up to the body free radicals which react unwholesomely with other body fluids, thus causing all the aforementioned diseases.
Important point worthy of note is, instead of going for junk foods, why not just consume foods that are balanced diet, which are rich in all the six classes of foods including fruits and vegetables. Junks food are not only snacks like meat pie and the rest, but any processed foods such as fried meat, fried chicken, white bread, white rice, and so on so forth.