@Background Pony
Not exactly gills, but similar. They’re called book lungs, and they pump the crab’s blood with each flapping motion, as well as moving themselves through the water to pick up oxygen. Scorpions also have book lungs. It’s one of the reasons they’re so hard to fumigate. Unlike insects who have breathing holes all over their bodies providing a path for the poison to go deep inside, scorpions and horseshoe crabs have a membrane barrier between their blood and the air.
When I was a little cub, I used to go out on the beach during hatching time, and help their little larvae make it from the nests to the water. Horseshoe crabs are 100% beneficial and harmless.
I actually really like these guys because they are interesting biologically as they are over 450 million years old and ironically are much more related to arachnids than crustaceans. Also their blood while blue is used by medical companies to detect bacterial infections in people.