Upper-level play not having many gambits, huh? You forgot the Queen's Gambit. It's a major opening line for beginners and super-GMs alike.
The idea of the gambit is to trade material for activity/development/threats/tempo. It creates an imbalance that's harder for your opponent to calculate, usually putting them on the defensive. In the KG or the Evans, with an extremely agressive line chosen White can basically grab hold of the initiative forcing Black to respond to threats - this makes for an interesting attack or a tactical firestorm in the middlegame. In the Benko, Black trades a pawn for free piece play on the Queenside and often ownership of the dark-square diagonal, whereas White has a hard time developing because of the difficulty of pushing e4 without forfeiting casling or playing at least 5 slower preparatory moves (Nf3 g3 Bg2 0-0 Re1).
Truth be told, single pawns are not really a huge loss in the opening, especially if the compensation is good enough. Often you can regain your gambit material with interest if you can make the right threats and keep the initiative. I don't think any of the more frequently seen gambits will ever be phased out because they're what make for some of the most interesting games.
EDIT - as to "knowing the lines" - with most mainstream gambits, the person who gives up the pawn has far more choices of how to steer the game, and if they keep the initiative the opponent has to keep responding to threats. In some of the more positional gambits (once again I speak of the Benko since it's a personal favorite), I've seen 1900-rated players lose the exchange by force against it because of the active play that Black can get. There's just too much for a single person to know because of the activity that the gambiteer will get.
Many may claim that gambits are perfectly ok, and that many grandmasters all over the years have proved them to be solid enough. however... let's be honest: You don't see many gambits in the chess-elite nowadays. I believe there was way more gambit play in the early romantic-chess era. Nowadays, you will hardly ever see a grandmaster play for a King's gambit accepted in a decisive match.
Another thing that I find interesting is that I've never seen a computer play a gambit. It's probably because there's no clear advantage from it, other than maybe a couple tempi and piece development... but truth be told, if your oponent knows the line (or calculates it by force like comps) then you're prety much lost. So it finally comes to this question: Are gambits solid at all? or will they ultimately get "solved" and dissapear from high level opening choices?