Something a friend always said and I wondered if there's any truth in it?
These questions are fairly common and very much like 'samurai versus frankish knight' questions, they are incredibly hard to answer because of how general they are. Not to attack you or say that it is a stupid question, nothing of the sort!
Simply that the more one tries to answer this question in detail, the more one realizes how frustratingly difficult it is to even try and reach a definitive answer that satisfactorily answers the question beyond 'it depends'.
For example, how should we choose which swords to compare to which swords?
Many Japanese swords were made explicitly as status symbols and works of art, because of the incredible investments of time, effort, man hours, and money. They could have been used on the battlefield but it would be similar to bringing a gold plated handgun to battle (in terms of how it would have been looked at by their contemporary peers). On the other hand, some of these were often extremely well made swords that would hold up in battle, regardless of extra bells and whistles added as artisanal touches.
And should we limit our choices to select periods of time? Different eras and different areas had differing methods and thus differing results.
Differing ores, craftsmen, purposes, etc etc
And we haven't even thought about what kind of European sword to compare it to yet.
In what areas would we have these swords duke it out? Armor penetration? Ability to hold an edge throughout a long campaign? Durability? Greatest likeness to American presidents?
With any kind of broad question, any reasonable kind of reply will generally be similarly broad and probably not as definitive as everyone wants it to be.
In this case, what we can say is that Japanese smiths did indeed often have issues sourcing quality ores. This is not to say that they never had quality ore, only that it was relatively much more difficult for them to obtain than it was relative to other areas. For example, one of the major imports to Japan was ore from China and Korea.
Several islands near Honshuu were also renown for their mines.
Moving on!
To deal with this, when smiths did endevaour to make swords in Japan, they had to use a variety of techniques to make a usable sword given the generally lower quality ore they had to use on a regular basis. This made manufacturing swords more expensive and laborious, not necessarily worse in inherent quality.
Without launching into a huge semantic discussion of what quality is, usually one determines the quality of a weapon by seeing how accessible it is (user friendly), how easily it can be obtained/manufactured/supplied, and how well it fits its intended purpose.
Hence, why it's very hard to compare the general quality of Japanese swords versus European swords. They were, for the most part, developed independent of one another, in different environments, with different stresses and needs, with different users in mind, and often for different purposes.
But I can confidently say that katana were not inherently any greater or lesser of a sword than other European swords simply by virtue of being a katana.
The katana was not some slayer of men that would transform men into gods. But the opposite extreme, of assuming katana were all hopelessly inferior to even the crappiest two hander from England, is also ridiculous.
There were some majestically made katana and there were rushed, quickly massed produced, shoddy katana. Just like there are European broadswords fit for kings and ruddy pieces of iron that is can only be generously called a weapon of war.
If you have more specific questions about quality in manufacturing, what the katana was for, how its role changed throughout the years, more specific comparisons, etc. I'd be happy to answer any follow up questions you might have. Cheers!