Celeste actually does this.
The thing is, Celeste was originally made for the fantasy console known as the pico-8; this game could be seen as a prototype, with only 30 screens, but it still featured the protagonist and her air dash. When the game was expanded into a full commercial release, a port of the original was included.
Of course, one of the best examples of games within games is the Nintendo DS title "Retro Game Challenge" (Game Center CX in Japan), which contains something like 8 games that you can play. The games are shorter than the retro games they're imitating, but are still a decent length (especially since one of them is an RPG). The game got a sequel in Japan, which I have played, and is quite good except for the fact that one of the games is a text adventure, which is not accessible if you don't know the language (I just found a guide online that simply gave a series of commands that would complete enough of the game to go on to the next one; playing a text adventure this way is not fun).
Edit: Since 227 mentioned some Nintendo 64 games, I believe the original (Gamecube) version of Animal Crossing has some NES games hidden in it; this feature is not present in any of the sequels, however.
Post edited March 21, 2018 by dtgreene