The essential feature of RPGs that sets it apart from other kinds of games is character systematization, here understood as a systemic matrix that allows for the creation, development, and expression of diverse and discrete character configurations. The latter need not be understood necessarily as corresponding primarily to personality traits (such as roguish or heroic) as they can be in story-oriented CnC games, but can also denote diverse combat roles (such as healer, sniper, or debuffer) as they do in dungeon crawlers and tactical RPGs. One could attach such a system to any kind of gameplay, from dialogue-driven, to abstract turn-based tactical, to even real-time action and exploration. Proving Grounds of the Mad Overlord, Morrowind, and Age of Decadence can all easily be considered instances of RPGs per this definition, so it is intuitive as well as coherent. What matters is that there is a sufficiently robust character system present that allows for enough variety in roleplaying.
In order to clarify this last point, we should distinguish between the three layers that such systems have: concept, build, and role. The concept is the symbolic part, that which denotes the sort of archetype that the character expresses. Typical character concepts in RPGs include the barbarian, thief, ninja, samurai, paladin, and druid archetypes. This aspect can be reinforced by itemization, especially in games with developed visual representation where certain types of equipment can help a character "look the part", such as katanas for samurai and whatnot. Even though this is the 'flavor' part, it can be found even in very abstract games like Wizardry.
Build refers to the statistical and mathematical aspect of character customization: the scores in different categories such as attributes and skills. It is not always dominated by scores, but also includes binary "perks" or "feats" that allow certain characters to do certain things that others simply can't, these can be active or passive. This layer represents the abstract quantitative aspect of the character system, and is to be found even in real-time and action RPGs. These systems can be interfaced in granular or integrated ways, in other words, they can be like that of Fallout and permit you to micromanage the details of your build throughout the game by picking perks and investing points in skill scores, or they can be like AD&D and early Wizardry and allow you to pick classes that come mostly "bundled" with a predetermined set of feats, passives, and scores/score advancement tables. Multiclassing and dual classing can make them a bit more micro-intensive, but rarely as much as granular systems. Both approaches to interfacing character build can be good depending on the context of the overall game design.
There is then the role system which denotes the actual gameplay possibilities and capacities open to different characters. In turn-based tactical games, this is often expressed in the form of different tactical roles like sniper, tank, buffer/debuffer, healer, etc. The typical MMO triad of tank/DPS/healer comes to mind, but it should be noted that MMOs are usually very impoverished in this regard compared to proper cRPGs which often offer many more possibilities for tactical roles. Action RPGs, immersive sims, and interactive sandboxes often also provide for the expression of roles in terms of mechanics built into the physics engine which can go beyond merely offering different styles of combat, but can include things such as stealth and physical interaction during exploration such as those offered through a variety of spells like Levitate and Mark/Recall in Morrowind, or the psionics in System Shock 2.
A good RPG is one in which the three layers of the character system are properly structured and interlaced with each other and the corresponding gameplay systems, while also providing sufficient diversity in character options across the layers. This may result in emphasis or de-emphasis of one of these aspects or the other, not to mention different ways of interconnecting them as the game's design principles may require.
With all of that said, it should also be noted that there have been, historically, many other properties that have been linked to quality RPG gameplay, like tactical combat and dungeon or overworld exploration, and I think that such elements, though not essential per se, are often in practice very important for a quality RPG, even if its essential nature also allows for many untapped possibilities for experimentation.