The word crane refers to the large, long-necked elegant wading bird that you would find in the marshes and plains in many parts of the world.
Now, when you say the women craned their necks to see the actress pass by, we mean that the women stretched their necks in order to get a better view of the celebrity. So, crane also means to stretch like a crane bird would do!
Other examples: eg:
The children craned to get close to him.
He had to crane his neck to see what was happening on stage.
Crane is also a tall machine that moves heavy things by lifting them in the air and it is clearly named after the long-necked bird as well!
So, quite a versatile word this!