I mean, define hidden gems I guess, but here's a few that come to mind...
Retail
-Tom Clancy's Ghost Recon: Shadow Wars is often mentioned on lists of good strategy RPGs, since it's a top-down, turn based strategy game in the vein of Fire Emblem. Producer of X-Com worked on this. It's prone to crashing though.
-Puzzle & Dragons Z + Puzzle & Dragons Super Mario Bros. is hardly unknown, what with the Mario license attached, but I'm not sure many people actually played it. Supposed to be super addictive.
-LEGO Harry Potter Years 5-7 is interesting for two reasons: it looks to be fairly good conversion from the Wii version, and the previous game in this franchise (Years 1-4) was never released on 3DS. I played this on Wii, and while Years 1-4 is the better game, most of this is just down to the slapstick comedic tone of LEGO games meshing better with the lighter stories rather than the moodier later movies.
-Rayman Origins is a really good game, I'm sure it's fine on 3DS too. Hardly hidden, but I doubt many people played this on 3DS either.
-Ace Combat Assault Horizon Legacy+ is a contender for stupidest name on the console, but apparantly the game is all right.
These are just hidden, not sure about the gem part.
-The Farming Simulator games genuinely look pretty good in the graphics department. If this is your jam, there's like 6 different versions of it available at retail. Newcomers beware though, on 3DS these games don't come with tutorials (well maybe the 2015-2018 versions do, the ones before don't).
-Rodea The Sky Soldier has a version on 3DS, which was also up-ported to Wii U. To be honest though I think that's more of a curiosity; the Wii version is commonly referred to as the far superior game.
-Shifting World is one I've never seen in stores, but a retail version does exist. It's a really slow-paced platformer with dual-world mechanic. I really hated the demo and would absolutely not recommend it, but it sure seems hidden...?
Download
-Severed is one of my favourite games, well, ever? Playing with the map and touch screen closer together likely makes this the best version, too. Has crossbuy with the Wii U.
-MyNintendo Picross: The Legend of Zelda - Twilight Princess is a freebie on MyNintendo. For a mere 1,000 platinum coins, you can get this Zelda themed version of digital crack cocaine. Kept me hooked for 16 hours and it's secretly my favourite 3DS game (sorry Metroid).
-SteamWorld Dig 2 is also on 3DS eShop, if you don't have a Switch yet! Got absolutely rave reviews.
EDIT: Oh there's quite a few fighting games on 3DS too. Dead or Alive Dimensions was rather well received I think, Tekken 3D Prime was more mixed. There's also some fighting games which look absolutely miserable. Tenkai Knights looks slow like molasses for example, and Ubisoft's Combat of Giants: Dinosaurs 3D looks like a strong contender for worst game on the platform. Did anyone play these? I feel sorry for them.