Chess getting played since long years with evolutionary advancements. In this process few openings or variations may get outdated. Can it happen so?
The game of chess depends upon outwitting your opponent. Part of the toolbox used by the top players is changing the openings so that their opponents find themselves surprised and unprepared for the new position. This also results in opening variations that are discarded because a flaw has been found.
Openings also go in and out of fashion, for the same reason. The Scotch Opening, for example, first became popular when it was played in a major correspondence chess match between the London and Edinburgh Chess Clubs from 1824-1828, at the recommendation of the Scottish player, John Cochrane.*
Here's a summary of how often it was used in the years that followed, as a percentage of all Double King Pawn games (1.e4 e5) that were played in that period:
Period Period Scotch Begin End Opening % 1824 1900, 7.5% 1900 1950 3.3% 1950 1989 5.4% 1990 2000 10.4%
The jump in the last period has been attributed to Garry Kasparov's surprising Anatoly Karpov with it during their match in the 35th World Championship in 1990. In addition, for the 16 years after that, from 1990 through 2005, Garry Kasparov had a score of 17-8-0 with it (17 wins, 8 draws, no losses). This drew attention to the opening again. It has maintained its popularity in the years since that match.
However, the King's Gambit has not gone through the same increase in popularity:
1824 1900, 16.5% 1900 1950 9.4% 1950 1989 5.4% 1990 2000 2.9%
From this data, you might think that the reason the King's Gambit is unpopular is because the results that White achieves with this opening are disappointing.
But that hypothesis can be disproven: In that last period, 1990-2000, White scored 56% with this opening, with only 18% draws. This is a substantially higher rate of wins than in many other openings.
However, at the highest levels of play (players over 2400 ELO), White scores only 51% with this opening! This is very poor performance, when compared with a 55% win rate in all Double KP openings. So, because they don't get good enough results with it, it's unpopular at the highest level of play. Only 2.2% of all double KP games involve the King's Gambit at 2400+ ELO.
This suggests that players at lower levels are following fashion set by the highest level players, not the actual results they can achieve in practice at their own level.
*The Scotch Game Explained, Gary Lane, Batsford Chess 2005, p.5
Yes, openings can fall out of favor. At the higher levels, it often has to do with how well an opening performs, but it can also be due to a matter of popular style.
Typically a refutation of a particular line makes it unpopular, for example, the Dragon Sicilian fell out of favor in the 60's when Bobby Fischer, among others, found lines that led to overwhelming victories by white, including upsets of much higher rated players.
The Cambridge Springs Defense is an example of a line that used to be a popular, and rather successful, variation for black in the Queen's Gambit Declined. To avoid it, players of the white pieces started to play the Exchange Variation of the QGD. When black started to equalize against that, the leading players had moved on to other lines in the QGD.
Sometimes it's a matter of style or movement. The Philidor Defense is and example of an opening that lost popularity because it leads to cramped positions, that are difficult to defend.
In the early to mid 20th century, the romantic style was fading, and the hyper-modern movement was on the rise, so there were a lot fewer King's and Evans' gambits, and more Reti-English systems and Indian defenses to the Queen's Gambit being played.