(i) words derived from Chinese (kango) are a large part of written Japanese vocabulary;
(ii) kango came to Japanese largely through the writing system (not through massive Chinese immigration);
(iii) and most of the problematic homophones are kango. There aren't that many homophones in "yamato kotoba", the "native" Japanese words.
So, yes, a large number of homophones emerged through use of the written language. Of course they're part of the spoken language now, but the written language is significantly more formal and so still contains more kango, and therefore more homophones.
For some evidence on (i) and (ii) see http://en.wikipedia.org/wiki/Sino-Japanese_vocabulary
There are at least two reasons for (iii): spoken language naturally leads to different words having different sounds; on the other hand, many words that sound different in old Chinese end up sounding the same when adapted to the Japanese phonology. This is because Chinese has tones and consonants and vowels that don't exist in Japanese. So Chinese "kang1", "kang2", "kan1", "kan2", etc, all become "kan" in Japanese.
As blintson said, context is enough most of the time in conversation. Example for "yamato kotoba": hana can be "nose" or "flower", hashi can mean "bridge", "edge" or "chopsticks". As you can imagine, most of the time the intended meaning will be clear.
From the top of my head, I can only come up with 2 pairs of homophones that often elicit clarification in conversation: shiritsu can mean both "municipal" (市立) and "private"(私立). Annoying when you're talking about schools. Another is kagaku which can mean both "science" (科学) or "chemistry" (化学).