Maintaining the intake of excess calories relative to your needs leads to weight gain, not a specific magical food. That said, if you tend to overeat delicious, cheese-packed palak paneer, it could potentially help with gaining weight. (You could also choose never to eat palak paneer and gain weight with different foods.)