Are there any openings that were once often played, but are now known to be very bad moves?
Openings tend to go in and out of fashion. At example, the Berlin wall was considered to be very dull and unambitious, but then Kramnik played it against Kasparov to become World Champion. Nowadays the Berlin wall is a regular guest at top tournaments. The same can be said about the Scotch Game, which was rarely seen at the highest tournaments until Kasparov picked it up.
So most of the time when openings are not often seen it is because of fashion. One more important reason is that there may be critical lines that lead to unfavourable situations (like that the opponent can force a draw by repetition). Usually it takes a few years, but then someone comes up with a different idea and the lines are playable again. I remember vaguely a game in the poison pawn variation of the Grunfeld Indian between top 10 players (can't remember who, sorry) that turned the evaluation of the whole line upside down. Such games can kill or revive a line all of a sudden.
More generally, in my opinion there are several phases of the way chess is played. In the early days attack was everything and theory was not well developed, so gambits of all kinds were played (Evans Gambit, King's Gambit,...). I'd call it the romantic phase. Then the scientific phase began with lots of general rules discovered and well researched plans. This led to different opening, more balanced systems becoming the mainstay of tournament play. If you followed the rules of thumb your opening were considered sound. Nowadays we have entered the computerized phase, where concrete variations checked by computers rule the tournament halls. This led to the rise of some very sharp, concrete opening systems that otherwise no-one would have dared to play. So, depending on the time in history your question is asked, you will get a different answer about which opening is a bad choice.
The Giuoco Piano was quite popular around the turn of the 20th century (observe, for instance, Chigorin's use of it. Now, however, it is not seen as a good attempt at an advantage for White. Similarly, the Evans Gambit was once given a lot of use by the best in the world; it is no longer taken quite seriously.
In general, "gambits" used to be popular in the 19th and early 20th centuries, but are usually considered inferior nowadays. This includes not only kings gambit but the Evans gambit, and "wing" gambits such as the Muzio gambit or offshoots such as the Grob ("Spike") opening.
Modern theory, with computerized simulations, show that with accurate Black play, an early pawn sacrifice is usually not worth it. One exception is the Queen's gambit, where the sacrifice is more apparent than real, because White will usually regain the pawn, or Black will have hard time holding it.