Hey man, I'm definitely no expert on it - I've been having issues with this for as long as I've been working out. My best success has been working out less ( I know, seems weird ) but for me, I work out every other day, and have what I call Eat days. There's pretty much no way around it, I've tried everything, but the trick is, you just need to eat.
Then you need to pick muscle groups that go together for you (chest and bis, shoulders and tris, then leg days is what I do) and then you do one of those each day you work out, so you're only doing that muscle group once a week. That's the only way I was able to gain weight and it came slow (10 pounds took me about 4-5 months).
That way gives you time to rest your muscles and have them rebuild, whereas before I would workout every day and do the same muscle groups every other day because I wanted a big chest and biceps - and they weren't getting enough rest and rebuild time to get the results that I wanted.
ON EAT DAYS - pack on the calories, I've actually been trying my best to count calories, which is a huge pain in the ass, and there are WAY better ways to do this - but I've been eating out a lot because most restaurants have how many calories are in each meal. I eat a lot of Chinese because they're really generous with their meats (5 chicken breasts with rice for 13.50 at one close to me), as well as lots of smoothies with protein. I like to get Chocolate milkshakes and put whey protein in them because they're really high in calories. Unfortunately, its real expensive to eat out all the time, but I'm too lazy to do all the cooking and stuff for myself.
ITS REALLY HARD, and my biggest issue was when I was finally meeting my weight gain goals, I would frequently get sick and lose the weight very quickly, which is extremely depressing - so take some supplements to keep you healthy as well.
**** I AM NOT AT ALL AN EXPERT, this is just what has (semi) worked for me. Hopefully someone more educated on this will add to mine or maybe tell you the exact opposite, and maybe I'll get better results too. Good luck man