As with a lot of the details of Plato's life, there is no contemporary source concerning this story.  It comes from Diodorus' Library 15.7, Plutarch's Dion 4-5, and Diogenes Laertius' Lives 13.18-21.  (In the link to the Diogenes translation, the story begins under "XIV", but it's technically 13.18 of Diogenes' text.)  The three accounts differ in details, and it's not known how true any of them are.  The incident is not (I believe) even mentioned in the notorious Seventh Letter, which was written in or very near Plato's time.  We must keep in mind that in the centuries following great figures like Socrates, Plato, and Aristotle a lot of purportedly "biographical" information was simply made up out of whole cloth, sometimes for the purpose of scandal, sometimes just to fill in the gaps.  The ancient Greek scholars Kirk, Raven, & Schofield speak of "the great period of fictitious biography in the third and second centuries [B.C.]" (The Presocratic Philosophers, Cambridge, 1983, 2nd edition, p. 81).