The concept suggested by the phrase It takes two to Tango was in use several centuries before the early 1900s.
According to the facts presented in Jennifer Speake's book, "The Oxford Dictionary of Proverbs," the notion of it takes two is presented in terms of a Bargain and a Quarrel:
It takes TWO to make a bargain
Both parties to a bargain must consent to and keep the agreement.
1597 BACON Colours of Good & Euill x. 68 The seconde worde makes the bargaine. 1598 Mucedorus B2 Nay, soft, sir, tow words to a bargaine, a 1637 MIDDLETON et al. Widow v.i. There's two wordds to a bargain ever...and if love be one, I'm sure money's the other. 1766 GOLDSMITH Vicar of Wakefield II. xii. 'Hold, hold, Sir,' cried Jenkinson, 'there are two words to that bargain.'
It takes TWO to make a quarrel
A quarrel cannot happen unless the two opposing sides both insist on getting their way.
1706 J. STEVENS Spanish & English Dict. s.v. Barajar, When one will not, two do not Quarrel. 1732 T. FULLER Gnomologia no. 4942 There must be two at least to a Quarrel. 1859 H. KINGSLEY Geoffrey Hamlyn II. xiii. It takes two to make a quarrel, Cecil, and I will not be one.
According to Christine Denniston in an article, "Couple Dancing and the Beginning of Tango,"
The first piece of music written and published in Argentina describing itself as a tango appeared in 1857. It was called "Toma maté, ché".
As such, the term Tango would likely have not been in use much before that year, though pinning it down is a tad more complicated due to the uncertain origin of the term itself.
In addition, Ms. Denniston further explains that the dance Tango seems to have made its way to Europe from Argentina in the early 1900s:
The earliest evidence of Tango being danced in Europe comes from the first decade of the Twentieth Century. It probably came into France first through the port of Marseille, where Argentine sailors would dance with the local girls, and Tango was the couple dance they prefered. There is evidence of a couple dancing Tango on stage in Monmartre in Paris by 1909. But it was in 1912 that the Tango took Paris by storm.
Although I have no proof to confirm the reference to a book of poetry in 1912 given by user "HotLicks" above, if that is so, then 1912 is likely the first use of the term with the phrase It takes two to Tango.