I ran across an 1850's candle holder used in mines called a "sticking tommy". It was hammered into a crevasse in the rock or into a wooden beam. It also could be suspended by a hook. There were apparaently thousands of variations on this design, and looking at them, I am wondering if maybe what I have was a form of this device? The other owner of the foundry was an inventor, so it is possible that this is a unique design. There were also "iron bettys" which were basically the same idea, but an oil lamp was suspended instead of a candle. Some of them had spikes. What makes me question this is that to hammer it into a wooden beam would be awkward, although not impossible.
However, it is also possible that if this was a hanging spike that was in use inside the foundry and a permanent fixture inside, it could have been hammered into a beam first, then the pin and whatever it held were put through the fork of the Y. That would be quite practical in that sense. Additionally, the foundry was swept away in a flood in 1855, then rebuilt on the same spot. It is entirely possible that an item like this could be quite early, and then was buried beneath the rebuilt foundry.
Here's a sticking tommy:
And the lamp in the center with the spike is an iron betty: