No, you do not have to get sore to gain muscle. In fact, working out to the point that you are sore the next day means you operated past peak efficiency and will end up gaining less muscle from that work out than had you stopped a little sooner. The same is true of stopping too soon, of course, though at least that doesn’t come with pain. You will never know, however, that you are gaining muscle just from the sensations in your body. You can track your long-term results and see that you have gained muscle, and you can know that you are following a program that will build muscle when followed correctly, but you cannot feel your muscles growing.
This is not to say that there are no physical indicators during your workout that can tell you whether or not you’re being efficient. One common recommendation—though by no means universal, and the subject of some controversy regarding method—is to exercise to the point of failure. The notion of “failure,” however,” is not always understood properly. It’s not the point of pain, of exhaustion, or of no longer being able to do the exercise. It’s the point of no longer being able to do the exercise properly. Anyone can get a few extra bicep curls in if they recruit other muscle groups to help, but that’s not the point of the exercise (and will likely lead to soreness).
You also need to know the correct way to determine weight and repetitions. Exercising to the point of failure is a lot different depending on whether you are lifting 15 pounds or 150 pounds. Figuring all of this out and coming up with a workout plan that fits your goals often requires the help of a trainer who can give you advice tailored to you. You don’t necessarily have to hire someone to work with you every week. One or two sessions to develop a program and teach you how to track your own progress will suffice if you are self-motivated enough. So while you may need some expert help, you won’t be reliant upon it forever.