What speakers mean now
In present-day English, wife is first of all a married woman considered in relation to her spouse. That is the unmarked reading in ordinary speech, in law, and in most forms. The same string once covered a wider field: an adult female person, married or not. The marital sense became the default, but the older, more general sense did not disappear. It remains visible in a handful of compounds that make little sense if every wife must be a partner in a marriage.
A native Germanic noun
English did not borrow this word from French or Latin after the Conquest. It is inherited. The OED places the noun in the Old English period, before 1150. The Old English form was wīf, a grammatically neuter noun. Middle English wrote wif and wyf. Modern wife is that line continued, not a later import given a new English dress.
West and North Germanic languages keep close relatives: Old Saxon and Old Frisian wif, Old High German wīb, Old Norse víf, Dutch wijf, German Weib, Danish and Swedish viv, with later matches in Frisian, Yiddish, and the Scandinavian literary word viv. Gothic, the earliest Germanic language with a large written record, does not show the noun. The family is therefore Germanic, but the word is not attested in every branch.
Those correspondences reconstruct Proto-West Germanic *wīb and Proto-Germanic *wībą (some older handbooks write *wīfa-). That is as far as the comparison is firm. The origin of the word wife, in the sense of a pre-Germanic source, is not settled.
Where the trail goes cold
Beyond Germanic, proposals disagree, and none is standard. One suggestion ties the noun to verbs of wrapping or veiling, as if the first picture were a woman marked by a covering, perhaps a married woman in a headscarf. Another links it to a reconstructed Indo-European root for shame or female genitals, citing possible Tocharian relatives. A third looks at verbs meaning to swing, throw, or bustle, and reads the noun as a busy household worker, with a later German occupational word Weibel offered as a distant parallel. Each account starts from look-alike forms. None has won the field. The Germanic word is clear; its Indo-European parent, if it had one that we can recover, is not.
English already possessed another inherited term in this area, the ancestor of queen and of the now-separate quean. In a number of languages a single noun does duty for both woman and wife. Old English could use wīf that way, which is one reason later speakers built a clearer compound when they needed an unambiguous word for a female person.
The compound that became woman
That compound is Old English wīfman: wīf plus man in the old sense human being, not adult male. It is the source of modern woman. The formation is a clue that plain wīf was no longer sharp enough, on its own, for woman as opposed to man. A matching term wæpman, a male person, dropped out of the language. Wīfman did not. So the ordinary English word for an adult female is a compound built on wife, while wife itself narrowed toward spouse.
Grammatical gender belongs to the same history. Old English wīf was neuter even when it named a woman; articles and adjectives agreed as neuter. That mismatch between sex and grammatical class is ordinary in older Germanic. The irregular plural wives is the expected voicing of f to v between vowels, the same pattern as life and lives or knife and knives.
How the sense narrowed
In Old English, wīf could mean a woman, a female being set against a male (wer), and also a married woman. Legal and biblical prose use it as a spouse; other passages use it where current English would say woman. Both readings are old. What changed is which one is unmarked when the word stands alone.
By Middle English the spouse sense was taking over as the main free-standing meaning. The general sense of woman lingered in regional speech and in fixed phrases. Old wife for an elderly woman is recorded from about 1200, often slighting, and it survives in old wives' tale. Housewife appears in the early thirteenth century as husewif: a woman, usually married, in charge of a household. The household role, not the marriage certificate, is what the compound was doing. Fishwife, attested in 1381, used the word for a tradeswoman of modest rank who sold fish. Midwife, from around 1300, is the woman who is with a mother at birth: Middle English mid meaning with, plus wif meaning woman. None of those formations requires the modern marital reading.
Cognates elsewhere shifted in tone rather than in denotation alone. German Weib was once an ordinary word for a female person; from about 1200 it took on a common, even coarse, colour as Frau held the polite ground. Dutch wijf has passed through harsh slang. English kept wife as a standard, even formal, term for a spouse, and parked the older woman sense in those compounds.
A rare verb to wife, to take a wife, is found in the late fourteenth century. It never became the usual way to say marry.
A fossil in plain sight
If one later form still shows the older meaning without strain, it is midwife. The first element is not a direction in space. It is with. The second is not a spouse. It is a woman present at a birth. That is the inherited noun still at work, long after the free word wife came to mean a married partner.