I have a hard time gaining weight too, but I've managed to start making progress without resorting to counting calories.
It is basically just "portion control" but flipped around.
I eat "healthy" foods: lean chicken breast, eggs, broccoli, rice, whey protein powder and plain Saltine crackers.
I eat basically the same thing in the same order every day.
For dinner, I eat whatever I want (usually home-cooked Chinese dishes with lots of oil & salt).
I monitor my weight daily, but instead of making changes based on daily readings, I set a goal for each week and average the readings (I noticed my weight can fluctuate as much as 3kg from one day the next). If my weight is well below the average, I increase my portion sizes (i.e. I eat 2 bowls of rice instead of 1 at each "feeding"). If I overshoot my goal, I decrease portion sizes (usually eliminate morning carbs altogether and switch to eggs vs. chicken to try to take advantage of the fasting effect from overnight).
My goal is to gain MOSTLY muscle and some fat. I think it is impossible for me to gain pure muscle without fat. I am just too "hard" of a gainer.
My weight has been increasing (on average) 0.5kg per week. Strength is going up in a linear fashion.