The words "illicit" and "elicit" seem to be spelled and pronounced similarly, although their meanings appear different. Is this a coincidence or is there a connection between the two words?
Likely not. Here's a rundown of the commonly accepted account of each word:
'Illicit', like 'elicit' has Latin origins. The original Latin derivative is 'illicitus' meaning il- (not) -licitus (allowed) or simply 'not allowed' (and its a second declension adjective if you'd like to know). We might with more accuracy, considering connotations and what not, translate it as 'forbidden' or 'unlawful' (but that's getting sidetracked). The adjective 'licitus' itself is further derived, or at least connected, to the verb 'licēre', which means 'to allow'.
'Elicit' is believed to be derived from the Latin 'elicere', which means 'to draw out' (more specifically, it is believed to be derived from the past participle of 'elicere'). 'Elicere' in turn is believed to be an instantiation of the Latin prefix e- (out, from) and lacere (to entice, lure) ['lacere' is not to be confused with 'lacer' which is a derivative of 'lacerated' and means consequently 'torn' or 'mangled'].
All this suggests that as far as etymology is concerned, there is no proven relation between the two words since they don't possess a common ancestral word. That the words are homophones and share the same combinations of letters at the end is largely a matter of chance. But then again, language isn't absolute. For all we know there might be some word somewhere in history that supports the theory that there is a connection between the two (just don't bet your money on it).