c. 1200, "literary work consisting of a conversation between two or more persons," from Old French dialoge and directly from Latin dialogus, from Greek dialogos "conversation, dialogue," related to dialogesthai "converse," from dia "across, between" (see dia-) + legein "to speak" (from PIE root *leg- (1) "to collect, gather," with derivatives meaning "to speak (to 'pick out words')").
The sense was extended by c. 1400 to "a conversation between two or more persons." The mistaken belief that it can mean only "conversation between two persons" is from confusion of dia- and di- (1); the error goes back to at least 1532, when trialogue was coined needlessly for "a conversation between three persons." And compare quadrilogue "dialogue of four speakers" (late 15c.), in the title of the English translation of "Quadrilogue invectif," which consists of an allegorical dialogue between the Three Estates and a personified France.
A word that has been used for "conversation between two persons" and cannot mean otherwise is the hybrid duologue (1864).