A very good eye for geology, a sensitive inner ear and remarkable dead reckoning skills.
The dwarves just get geology in the same way humans intuitively understand how to throw and catch things. If you ask a Dwarf to describe the geology of their surroundings they won’t be able to, but on a bone deep level they’ll have picked up that the red sandstone layer formed a hundred or so meters below the yellow sandstone layer, with a slight incline towards the north caused by tectonic action a few dozen million years ago. That’s just information they’ll have picked up from observing their surroundings, watching how their parents navigate, and really grokking the workings of stone.
Of course, no Dwarf parent would dream of leaving their child with just that information, so they’ll practice ‘throwing and catching’, teaching and passing down knowledge that the young dwarves just immediately get. This has the effect of honing their offspring’s skills until they’re doing the geological equivalent of juggling. They no longer have to think, they just know not only what’s going on with the local geography (that they’ve been around since they were born) but can also extrapolate their skills to new and unfamiliar situations in ways that baffle those without the skill.
It might take them a while to reorient if put in an unfamiliar location, but it’ll be the difference between juggling apples and bananas : if takes a while to get used to, but hey, it’s pretty simple in the end.
The second thing the dwarves have on their side is barometry. Their inner ears can register pressure changes pretty sensitively, and they use this to add extra topological information to their already sophisticated understanding of tunnel networks. Air pressure in tunnels acts remarkably predictably, which gives any tunnel dwellers a good reference point to cross check with their current understanding of where they are. Wondering how deep you are? Gunthar the dwarf’s inner ear knows. Wondering if there’s a storm coming? How would he know? He’s lived underground his whole life.
The third (and arguably most vital) part of this ‘sense’ has nothing to do with stone, and is in fact something humans have got some skill for. This is the art of dead reckoning, or starting with a known direction, travelling some exact path with no external references, and ending up at a known location.
If blindfolded you or I might stumble into walls and doors, but someone who is blind can, in a familiar house, move with absolute confidence as long as nobody has moved things around. How? They hold the topology of the house in their mind and then dead reckon (ADDENDUM: It’s not this simple, but I’m trying to get a complex skill across using pictures invented by monkeys). They know that eight and a half steps from their bed there is the bathroom door. A ninety three degree left turn and four steps later and they’re at the toilet. Occasional touches on reference points and other ambient references provide navigational information but between the bed and bathroom door they’re purely relying on their own knowledge of their stride length, which will likely be an internalised thing rather than a conscious effort.
Other (frankly amazing) examples of this include Aboriginal Australians using absolute directions (North, West, east, south) instead of left/right, requiring them to always have the absolute direction they’re facing fixed in their mind and update it based on dead reckoning their turns. Another example would be the skill of ‘voyaging’ (multiple island societies did this), or setting out in a boat with no instrumentation bar your bare skin for wind speed/current measurements, holding all the navigational information of the trip in memory, then successfully reversing the course with no reference to actual position.
This is the skill your dwarves really need to foster. They hold in their minds an image of their path so far, and know exactly how far forward/left/right/up/down every step takes them. If a dwarf is conscious they will always be able to retrace their path, even in the pitch darkness.
Coupled with a mental map of the tunnels they know (or of how tunnels must form/ be mined out, thanks to geology) and the constant reference points provided by pressure changes (where they occur) that lets them rapidly and instinctively match their progress through any bit of tunnel to their knowledge of those tunnels and make nigh on miraculous inferences about their location.
If they know it’s likely (because in limestone of this type water prefers to flow in a certain way, obviously) the branch tunnel you’ve found to your left will arc through the rock and connect with the branch tunnel you passed on the right on your way in (which they remember the exact location of in their 3d mind map), then they’ll simply walk that way to route around the cave in that blocked your entrance. You won’t know how they did it. They won’t be able to explain how they did it an any way other than a gruff:
“Well, It’s knowing the stone, innit?”