I was recently emailed this question–this one comes up a lot. I actually dealt with this a bit way back when I was first entering culinary school, but that was a long time ago and it’s definitely worth revisiting the topic.
Off the bat, you actually don’t need that many knives. I know the big sets are tempting. They look cool and if money is not an issue, that might be the way to go. However, good knives are pricey, and most of us probably don’t really need most of the knives that come in most big sets. When it comes down to it, if I had to choose I'd rather have better versions of the ones that count.
Focus on a chef’s knife, a pairing knife, and a serrated knife. These three cover most uses. Aim to buy these from a really reputable brand like Wüsthof or J.A. Henckels. They definitely don’t have to be the top of the line versions, but they should be of good quality. The metal for the knives’ blades should extend completely through the handle. If you don't have a honing steel, you'll need one of those too. And while not a knife strictly speaking, a good pair of kitchen shears is extremely useful if you don’t already have one.
Prioritize the chef’s knife in terms of how you allocate money, as this is the most all-purpose knife and you will be using it all the time. It's really where most of the money should go. Ideally, you should try this one out yourself first, as the ideal weight and length of a chef’s knife are a matter of personal preference. Think of the connection with your chef’s knife kind of how the wizards in Harry Potter connect with their wands. If you’re buying the knives as a gift for someone else, give some thought to the intended cook’s hands. I have teeny hands, so a regular full-length knife tends to be too big for me. A 6-inch chef’s knife suits me much better.
The Mercer chef's knife that came in my culinary school kit way back when vs. my 6-inch Lamson Sharp chef's knife. Using the smaller one makes a huge difference for my elfin hands. I also often use the 6-inch Henckels Santokou, pictured in the group above.
Once you've spent all the money on good knives, you'll want to keep the knives sharp. This is really the most important thing, as dull knives are actually more dangerous and make you work much harder. Ideally, you should get a whetstone to sharpen them regularly. I realize that can be a pain, so at very least make sure to take them in to get sharpened from time to time. (People will take a hard line on using a sharpening stone vs. having them machine sharpened, but as far as I’m concerned having them actually be sharp is the important part.)
Like I said, I know the big sets are tempting, and if it’s really going to make you happy, go for it. (I have to admit that I have a soft spot for my knife set, despite all I’ve said.) But don’t be seduced just because it feels like you need all the knives. You don't. My mom once asked me exactly these questions when she wanted to buy knives as a gift. I told her everything I wrote here and then she went out and bought a big set from one of the celebrity chef brands because it was "muy completo." Complete the sets might be, but honestly, who cares if you’re not really going to use the specialized knives very often. I cook A LOT for a home cook, was trained on how to use all of the knives I have, and I still use the three described probably 90% of the time. Use of my chef's knives accounts for probably 75% of that time. Most of us don’t have a whole lot of extra space in the kitchen–this is a really easy area to KonMari. Use the space and money where it counts.