This is inspired by a clear and informative blog post on iterative game design by Dwiz at his blog "A Knight at the Opera." (It's worth reading!) He demonstrates the development of "to hit" rolls from OD&D to the general mechanics of 5e by following the step-by-step redesign of those rules in successive editions. He closes by encouraging game rule designers with the words "Too many people try to reinvent the wheel, when they should be looking at other people's wheels for comparison."
My intention here is just to sketch the background of rolling with Advantage and with Disadvantage. It comes from outside of D&D. In D&D 5e, advantage and disadvantage mean rolling 1d20 twice and dropping the worse of the two (with Advantage) or dropping the best of the two (with Disadvantage) instead of making fine-grained judgment calls about how many plus and minus factors should affect a roll targeting a difficulty number (mostly arbitrarily assigned by the referee on the spot).
My main point is that we have to look beyond D&D to find the origins of this mechanic whereby one rolls more than one die against a target number set by the referee and takes the better (or worse) result with the extra die. I see the roots reaching back nearly to the beginning of the hobby.
Let's start with Tunnels & Trolls, 1975. Saving throws in that system were 2d6 (doubles add and re-roll) + Luck stat, aimed at target number set by the level of depth of the dungeon you were in. You had to beat 20 on the first level to make the saving throw, 25 on the second level of the dungeon, 30 on the third, and so on. This soon expanded to a universal saving throw system based on any stat, not just Luck. Feats of Dexterity used the same mechanic, but with DEX instead of Luck, etc. Furthermore, the Referee could easily ignore the physical level of the dungeon (not all adventures being in tiered dungeons or in dungeons at all), and just say "Make a level-2 DEX save," estimating the difficulty on the spot. (And that's how I actually played T&T with friends in the early '80s.) This became the main resolution system in the underrated RPG Mercenaries, Spies, and Private Eyes (1983).
Here we see the innovation of target numbers set by the referee on the spot, originally in terms of level of difficulty, moving away from an even more arbitrary and incomprehensible saving throw chart.
Next in my sketch is the influential game The Fantasy Trip (issued in parts 1977-1980). Here, from the beginning (the combat rules Melee published in 1977), difficulty of a task was not expressed by a target number, but by the number of d6 you had to roll to get equal to or under the relevant stat, which is the "low-roll target." A normal save was made with 3d6, against an average stat score of 10. But an easy saving throw required 2d6 for the same target, a difficult saving throw required 4d6 for the same target, a super-difficult one took 5d6... etc. (This is, by the way, the direct antecedent of GURPS, in which the number of dice is invariably 3d6, but complicated plus and minus modifiers are used instead. I like The Fantasy Trip's system better, in many ways!)
Here we see, I think for the first time, a universal RPG mechanic in which the number of dice called for by the referee expressed the difficulty of the task. In this example, with a roll-under mechanic, the more dice, the harder the task. (If, somehow, it had been a roll-over-target rule, then naturally it would be that the more dice, the easier the task--like 5e's Advantage rule.)
Our next stop is the Ghostbusters RPG (1986), seemingly an odd place for a major innovation, but the brains devising it were three of the giants of Chaosium: Sandy Petersen, Lynn Willis, and Greg Stafford (the people behind games like Call of Cthulhu and RuneQuest). In the Ghostbusters RPG, stats are expressed as a number of dice. Instead of rolling 3D6 to determine your Muscle trait, like the STR score of a D&D character, the trait itself can be 3d6 (expressed just as 3). You roll your dice and add 'em up against a difficulty number set by the referee on the spot. Starting to sound familiar to you players of later games?
Here, the more the dice, the better you are at it. That number of dice (rather than the fixed outcome of a number of dice rolled together, such as 3d6 per stat) is the character stat. The target number for the grand total still expressed something about the difficulty as estimated by the referee.
This is, as far as I can see, the beginning of what we might call "classic dice pool mechanics." The games that followed the path of Ghostbusters, like the Star Wars RPG (1987) and then the generic D6 System (1996), started here.
But we turn from the Ghostbusters RPG just three years later to Shadowrun (1989), a much more popular game than Ghostbusters over the years, but one that shows inspiration from the Ghostbusters RPG mechanics. In Shadowrun, your stat similarly indicates how many d6 you roll, but instead of adding them all up, you count how many "successes" your dice show per die. The number needed is set by the referee. Let's say you roll 5d6 (because your stat was 5) and the referee says you need a 4. Then the number of individual dice that equal or exceed 4 indicates the degree of your success. This is basically exactly what the original Vampire: The Masquerade RPG  took over, but with d10 instead of d6. These "dice pool mechanics" would become very widely known during the World of Darkness game boom.
The idea of having more than one die each of which, separately and not as a total, gets tested against the target number, is another direct antecedent of the 5e Advantage/Disadvantage rule.
In 1992 there was Jonathan Tweet's and Robin Laws' game Over the Edge. To me, this was a huge breakthrough in character mechanics (wrapped up in one of the settings I have disliked, vehemently, for many reasons, more than almost any other setting, so I'll focus here on the mechanics). In this game, stats were basically descriptive. You say what you are, and that is your main "stat" (e.g. "Mad Scientist") and you add two secondary characteristics (say, "Debate Club Veteran" and "Computer Geek") and one flaw (say, "Sucker for pretty girls"). You undertake any actions related to your Mad Scientist "main stat" with 4d6, actions related to your secondary characteristics with 3d6, and other regular stuff with 2d6. You add them up and aim for a target number set by the referee. (I'm sure I'm leaving out relevant details, but that's approximately it.)
But additionally, the Referee can decide if circumstances are favorable or not. If favorable, the character can add a bonus die and drop the worst one. If not, then roll an extra die and drop the best one.
This is basically 5e's Advantage and Disadvantage, right there in 1992. I can't think of or don't know of an earlier version of this, but it may be out there--unless it's The Fantasy Trip, where the number of dice rolled indicates level of difficulty (but there is no dropping of dice either way).
Anyway, the main point: Advantage and Disadvantage dice are (as should be obvious if you think about it) a riff on dice pools. It is, in effect, a simplified dice pool with no adding of numbers needed, as in Shadowrun. These rules existed for many years before 5e made the rule canonical and widespread. It entered the stream with one of the "indie games" of the '90s written by two of the most innovative designers of that period.
Advantage and Disadvantage, as used in 5e, are fun because they cut out lots of on-the-spot calculations of bonuses and penalties that pile up into a huge stack as characters advance. Advancement is already rewarded by more plusses and minuses that have the side-effect of slowing the game down.
I find the roots of target numbers set by the referee on the spot in the saving throws of Tunnels & Trolls, starting 1975 (with exploding dice on doubles).
I find the dice pool mechanic where number of dice interact with difficulty rooted in The Fantasy Trip, starting 1977.
I find the dice pool based on player character stats in the Ghostbusters RPG in 1986.
I find the idea of "target number per individual die" in Shadowrun, in 1989.
I find the basic idea of Advantage and Disadvantage (extra die, drop best or worst) in Over the Edge in 1992.
Here, as in many other areas, the history of D&D cannot be extricated from the history of the hobby as a whole. In conclusion, as Dwiz says in his post that inspired me here today, "Iterations aren't always linear"!