Probably part of a system for handling loose hay. A huge claw hung from a track at the peak of the barn. The track was cantilevered out the top of the hay door at one end of the barn. You ran the claw out to the end of the cantilever, dropped it into the hay on a wagon, closed it, lifted it and its load of hay up, ran it back into the barn, and tripped the catch to drop the hay inside. That looks like part of the mechanism for releasing the claw.It is a bronze casting and the lock lever is spring loaded to hold on to a 1/2" or less flange or whatever.
What is it called?
View attachment 136254