yes, but at the transistor level .... it has no idea at that level how those transistors are arranged into gates directly
I take it back, it's a sky130 .gds the gates are explicitly in there
In fact if you have the sky130 libraries installed (it's where I'm working) you can get a spice netlist out of it in about 10 seconds - really they should have flattened it
The tools can definitely recognize static logic gates purely from the topology (nothing special in the GDS needed). I don't know that I've tested it for anything more complicated, but as you've pointed out, if the hierarchy is in the GDS it's trivial to recover