I know this is already answered, but I was just going to keep putting up longer and longer comments.
Technically the genre defining Harem Anime/Manga is Tenchi Muyo, so I think it deserves a mention.
The big distinction in favor of Tenchi Muyo is the romance component. While many earlier works may feature a popular guy who is chased by many women, a harem anime will attempt to incorporate romance. A Harem anime will also feature a seemingly worthless guy, who's hidden virtues (sometimes so hidden they don't exist) somehow win a scad of female attention.
Tenchi is this dorky-ish guy who fits the hard-headed/unconfident/awkward bill.
"Tenchi-Muyo" is a bit of an omni-pun with many meanings, the most popular translation is "No Need for Tenchi" or "Useless Tenchi".
As harem anime would have it he ends up becoming the desire of a house full of beautiful women:
- Space Policewoman
- Crazy Mad Scientist / goddess
- Innocent Girl Princess / goddess
- Strict Uptight Princess
- Party Animal Demon Girl / Space Pirate
- Normal schoolgirl
- ...and a shape shifting space cat-rabbit (cabbit).
As luck would have it, Tehchi is also heir to the throne of a galactic empire.
The chosen one who has light-saber battles against the forces of evil.
And a hard working student who basically keeps his mouth shut, has nosebleeds, and gets overly embarrassed all the time.
He also saves the lives of most of the girls at one point in time or another. Each female character has a different reason for her attachment to him (which may vary depending on the continuity).
The above items, while the setting changes, are staples of the modern harem anime.
The genre is a result of pushing the everyman envelope.
First the everyman is the chosen one, with powers, and a kingdom.
Now all the girls like him, but he's just too thick to notice.
Finally he basically has a house full of improbable women, who all want him. The everyman's dream come true. The story possibilities are endless, and even if you draw a blank for story, you can always have some kind of drama.
Tenchi came out in 1992, so it is 4 years younger than Ranma, and much younger than Yatsura. While Ranma is chased by several girls that he is technically engaged to, Ranma is unlike most harem heroes. He is confident, brash, and contrives humor from his many engagements in non-emotional ways. You'll never see the typical "guy accidentally falls and lands on one of the girls"-scenes. You will never see Ranma embarrassed about anything. However, it is a good candidate for a predecessor to Harem anime.
You've got to admit that Tenchi put the word "Harem" into the genre list.