So, before I give a real answer: My understandings of these terms may not 100% conform to everyone else's. I have tried to be relatively well-read on the subject, but I often fall short. So, if something seems to make no sense because of a conflict between the articulated meaning of these things in other spaces and the things I'm saying, assume that I have simply used the term idiosyncratically and ask for clarification with whatever specificity you can muster.
With that disclaimer out of the way....
For me, gamism in a design sense means asking, "What kind of game is D&D, as in, what is the nature of engaging with the rules of this game? What purposes are those rules supposed to fulfill? What goals must be met, in order for those purposes to be fulfilled? And, finally, how can we set testable goals so that we can evaluate whether those purposes are, in fact, fulfilled (up to some reasonable standard)?"
From the top: THE critical trait of D&D is, it's cooperative.[0] Players aren't competing, but collaborating toward group success. But "success" =/= "winning," in the sense of terminating play with a victor; rather, it's overcoming challenges as they come, though making failure also interesting gameplay is a desirable thing too. This cooperative nature implies a great deal. Frex, unless specified otherwise, each player should get (approximately) equal opportunity to push toward group success. That IS NOT identical abilities, nor perfect equality (an unattainable and often undesirable goal). What it means is that, up to some reasonble range, for the bulk of tables and situations, each player can meaningfully contribute to any interesting challenge, and each player can point to something specific they did to make success more likely (even if some contributions are less flashy than others). Teammates should, over some generally applicable span of in-game time, have highly comparable "amounts" of contribution. For D&D, that span is the "day," both because that's how magic usually recharges (and most classes are magical), and because the "day" is the only period respected by a broad swathe of groups.[1]
That covers D&D as a cooperative game, but what about D&D as a cooperative game? A game is something with rules, rules that can be learned, perhaps even "mastered." A game, as noted above, need not have a termination condition, e.g. it need not have some condition under which the play-sequence ceases (whether or not a victor is declared) and then begins anew, but it should have some kind of success conditions, e.g. it is possible to play "better" or "worse" in some meaningful sense. In order for the player to learn how to play better, they must be (a) able to make (sufficiently) informed choices, and (b) (sufficiently) responsible for the consequences that result from those choices; ideally, they should also (c) have (sufficient) time and opportunity to learn from a simple mistake before there are such severe consequences that the play-sequence ceases for them. This is why I take so seriously things like player agency, information consistency, choices, and as close as possible to a direct (unmediated) connection between what the player chose to do and what resulted.
From there, we can start considering what purposes the game is supposed to serve. Roleplay is, of course, a purpose of primary concern. However, beyond setting elements, rules do not (generally) directly contribute overmuch to worldbuilding. It isn't that they can't (though some have accused me of saying this), but rather that putting too much emphasis on rules-as-worldbuilding will often be excessively restrictive to what can be achieved within the fiction space. So, while this purpose must be kept in mind at all times while designing the rules, in a sense it more serves to shape and hone the rules crafted for the other purposes, rather than being a purpose for which rules should be created.[2]
A second purpose is to explore a world and seek adventure within it. This gives us a host of useful things we can talk about in design-goal terms. For exploration to be a meaningful part of gameplay, there must be challenges associated with exploration, which are non-trivial to overcome. This is an area where D&D often falls down, as the challenges associated with exploration are often either obtuse to the point of being nearly insoluble without mind-reading, or simple to the point of triviality because a single spell or ability will wish the problem away. This is why I value the Skill Challenge rules from 4e, even if they were flawed and needed...wise handling, shall we say, to truly shine. Because the Skill Challenge framework presents the possibility of exploration challenges that are necessarily non-trivial, and which should not be obviated solely by throwing a single spell or ability at them. On the "seek adventure" side of things, this entails both worldbuilding concepts (which, as noted, are somewhat outside the remit of this discussion, as I see it) and design goals, specifically making adventure a worthwhile pursuit. One of the common problems with a lot of games--not just D&D--is that many of them, in their effort to pursue maximal naturalism and verisimilitude, create games where it's hard to understand why anyone would choose to adventure in them.[3]
A further purpose comes to us directly from the fact that the game is cooperative: the rules of D&D should be designed such that teamwork is always important. This was one of the weakest aspects of 3e's rules, despite rarely getting much discussion: the best strategy in 3e is always to optimize your own personal contribution, not to synergize with your team. But D&D is pretty clearly centered on a team of adventurers who are supposed to depend on one another, not just being four/five adventurers who purely coincidentally adventure in the same places at the same times. This gives us further testable goals, because we can measure the effectiveness of groups that avoid teamwork vs ones that actively collaborate, and if the current rules are not rewarding teamwork enough, they can be tweaked to change that.
This post has already gotten quite long so I'm going to stop there. But, as I hope this has demonstrated, this process of design gives us a significant number of clear design goals, which we can develop metrics to test, and then perform actual, meaningful statistical analysis on playtest data to confirm whether those goals are being met. However, before I finish here, I want to reiterate:
This is about designing D&D as a game, not about filling it with awesome lore and concepts.
I am absolutely, positively, 110% in favor of excellent, interesting, rich lore. My favorite mechanics are those that drip with story potential or, in the ideal cases, where using the mechanic MEANS you're invoking a trope or a story or a feeling--where the line between "playing the game by its rules" and "telling a cool story together" blurs. That sort of thing is difficult, but it is absolutely, positively WORTH DOING, every single time. The main problem is, literally none of these things is meaningfully testable, other than asking whether players approve of it or not, which is...rather weak as far as analysis goes. Instead, this sort of thing has to be carefully crafted. Ideally, you work to make sure that where the rules lead the fiction, what fiction they lead to is great, and where the fiction leads the rules, the rules that spawn from that fiction are highly effective, excellently fulfilling the purpose for which they were designed.[4]
[0] I know this wasn't always the case. I consider that irrelevant to modern D&D, which is almost always purely or nearly purely cooperative.
[1] This is why 4e used the "5 min short rest, extended rest is a full refresh for all" structure. 5e's designers have learned that it's a lot harder to make a more-intricate resource system that doesn't start to fall apart if the players don't match your expected expenditure and refresh rates...which is exactly what happened with 5e.
[2] This, to me, is where the "the rules should just get out of the way" doctrine properly applies. Roleplay is, necessarily, something difficult to confine without straight-up telling players what their characters think or feel, and I find that a dangerous line to cross. It risks denying player agency, which, as noted, I am very reluctant to do.
[3] Hence my deep and abiding confusion when people complain about 4e's Points of Light setting as having been "designed to play in." Like...that's the point. You don't make a setting for a game that isn't designed to be played in. There may certainly be locations that aren't adventurable. Those locations, by definition, are not of interest to adventurers, and "adventurers" is literally what D&D is offering to let you play.
[4] Since these terms may have confused other posters in the past: when I say "the rules lead the fiction," what I mean is that the designer makes a rule, and then determines what fictional consequences or implications those rules have. The rules lead to creating fiction. Conversely, when "the fiction leads the rules," the designer has committed to fictional elements of some kind, and then works to develop rules which permit or support those fictional elements. The fiction leads to creating rules. D&D is full of examples of both things. E.g., 4e's Avenger strikes me (heh) as an example of fiction leading rules, as the concept of Investiture implied the need for divine "internal police." Conversely, I think the 4e Lay on Hands, which is very cool IMO, was rules leading fiction, because the existence of the Healing Surge rules led to a natural fiction of "I give of myself, to replenish you," which I love.