Why—and based on what—do we use “she” with “ship” in the English language? Why do we consider a ship female when we know that it is not alive?
It might be the best to answer this question by quoting from Wikipedia (Gender in English),
A system of grammatical gender, whereby every noun was treated as either masculine, feminine or neuter, existed in Old English, but fell out of use during the Middle English period. Modern English retains features relating to natural gender, namely the use of certain nouns and pronouns (such as he and she) to refer specifically to persons or animals of one or other sex, and certain others (such as it) for sexless objects – although feminine pronouns may optionally be used when referring to ships (and analogous machinery) and nation states.
Lots of reasons have been given, but the real one might be lost to human memory. Some say it's because sailors love them like they love women. Others say it's because it was feminine in Old English (Old English still had grammatical genders). Some give eccentric but nonetheless poetic reasons.
Read for yourself and take your pick :
Why is a Ship Called She
I, for myself, favour this one:
The ships were [the sailors' livelihood, their home and their love. As a compliment to the women they loved, they named their sailing vessels after them, telling them that it would remind them of the ones they left behind for the months and sometimes years they would be gone.
Not just ships. Many other things are subject to personification. Perhaps you are not old enough or familiar enough with '60s Golden Oldies to remember the Beach Boys:
Just a little deuce coupe with a flat head mill
But she'll walk a thunderburn like (she's) standin still
She's ported and relieved and she's stroked and bored. She'll do a hundred and forty with the top end floored
She's my little deuce coupe You don't know what I got
But you may know Stephen King's female of the species, Christine:
When 'arf of your bullets fly wide in the ditch,
Don't call your Martini a cross-eyed old bitch;
She's human as you are -- you treat her as sich,
An' she'll fight for the young British soldier.
A little higher up the evolutionary ladder, contemporary farmers (at least in Illinois) routinely refer to individual plants in their crops with a masculine pronoun:
Soybeans do a wonderful job of compensating, so if you give a plant a little room to grow, he’s gonna get big. He’s gonna get big, he’s gonna branch a lot, and bush out and youknow have probably have a lot more beans on a individual plant that’s not competing so much with a plant right next to him. (private collection)
Why this should be I cannot say. I only know that it pleases Great Mother Language when those of who enjoy complicated and intimate relationships with our tools and creations are able to transcend our narrow anthropomorphism.
I lived for several years in Newfoundland, where English pronouns had an interesting interpretation. "She" referred to any overwhelming and mysterious power that controlled or affected the lives of men. These powers included: women, cars, ships, the Atlantic ocean and even (in one case) the lock on someone's locker. Women and men equally used "she" in reference to these things. The other pronoun "he" referred to men, animals and God. I do not recall the pronoun "it" being used for much, but it probably referred to small objects of little importance or impact.
Damkerng's answer(No.2 above) is almost certainly correct. The basic structure of English is from German. However, both the word for ship (das Schiff) and boat (das Boot) are neuter.