Here is a quote from the article by Krzysztof Ciesielski: On Stefan Banach and some of his results. Banach J. Math. Anal. 1 (2007), no. 1, 1–10.
There is a curious story how Banach got his Ph.D. He was being forced
to write a Ph.D. paper and take the examinations, as he very quickly
obtained many important results, but he kept saying that he was not
ready and perhaps he would invent something more interesting. At last
the university authorities became nervous. Somebody wrote down
Banach’s remarks on some problems, and this was accepted as an
excellent Ph.D. dissertation. But an exam was also required. One day
Banach was accosted in the corridor and asked to go to a Dean’s room,
as “some people have come and they want to know some mathematical
details, and you will certainly be able to answer their questions”.
Banach willingly answered the questions, not realising that he was
just being examined by a special commission that had come to Lvov for
It is true that Banach was mainly self-taught as a mathematician, although he attended some lectures by Stanislaw Zaremba at Jagiellonian University. By the way, engineering programs in the former Austro-Hungarian monarchy (including Lvov Polytechnics) required quite an intensive training in mathematics, although of course the latest developments (Lebesgue integral etc.) were not part of the curriculum.
Addendum 0: The above story is also related by Roman Kaluza in his biography of Banach. He heard it from Turowicz, who credits Nikodym as his source (he himself joined the department later, when Banach was already a professor). Well, on one hand, Nikodym was a friend of Banach and his early partner in mathematical discussions, but on the other hand, at the time of Banach's PhD, he was teaching high school in Krakow. (This point was made by Krzysztof Ciesielski in an email exchange with me.)
Addendum 1: Banach's thesis, written in French (which he knew well and used before in publications) can be found here:
It was published in Fundamenta Mathematicae 3 (1922), pp.133-181, and bears only Banach's name. The footnote says that it is a "Thesis presented in June 1920 at the Lvov University for obtaining the degree of the Doctor of Philosophy."
On the first page there is a statement that maybe gives some evidence of Banach's tendency to wait until getting the best version of his results: ``Mr. Wilkosz and I have some results (which we propose to publish later) on operations whose domains are sets of Duhamelian functions(...)". There is no joint work with Wilkosz in the collected works of Banach...
Addendum 2: Some details brought up by other users need correction. First, Steinhaus met Banach and Nikodym in Krakow, where Banach grew up, not in Lvov. This is explicitly recorded in his "Memoirs and Notes", and somewhat less explicitly in the address he gave much later at a session devoted to Banach: http://kielich.amu.edu.pl/Stefan_Banach/steinhaus63.html ("Planty" is a major green belt in the old city of Krakow; in Lvov there were "Waly").
Second, Banach's PhD supervisor (only in the formal sense) was Steinhaus. Antoni Lomnicki held a chair of mathematics at the Lvov Polytechnics (not to be confused with the Lvov University), where Banach got his first position as an assistant (pre-PhD).
Addendum 3: Here is what Steinhaus wrote about working habits of Banach (see the link above):
His lectures were excellent; he never lost himself in particulars, he
never covered the blackboard with numerous and complicated symbols. He
did not care for verbal perfection; all manner of personal polish was
alien for him and, throughout his life he retained, in his speech and
manners, some characteristics of a Cracow street urchin. He found it
very difficult to formulate his thoughts in writing. He used to write
his manuscripts on loose sheets torn out of a notebook; when it was
necessary to alter any parts of the text, he would simply cut out the
superfluous parts and stick underneath a piece of clean paper, on
which he would write the new version. Had it not been for the aid of
his friends and assistants, Banach's first studies would have never
got to any printing office." And also: "Banach could work at all times
and everywhere. He was not used to comfort and he did not want any. A
professor's earnings ought to have supplied all his needs amply. But
his love of spending his life in cafes and a complete lack of
bourgeois thrift and regularity in everyday affairs made him incur
debts, and, finally, he found himself in a very difficult situation.
In order to get out of it he started writing textbooks.
Addendum 4: This is based on information I received from Danuta Ciesielska, a Polish mathematician and a historian of mathematics (and my classmate from Krakow). The documents from the Lvov University are now split between the Lvov District Archive and Lvov City Archive, http://www.archives.gov.ua/Eng/Archives/ra13.php (the documents of Polytechnics were transported to Wroclaw, Poland after 1945). The catalogs underwent major reorganization, which makes it quite difficult to find particular documents there. Besides the employees' folders, the documentation of PhD and habilitation proceedings is often found in the minutes of faculty meetings. Regarding Banach's PhD, Ciesielska saw a letter from Steinhaus to dean Stanecki (dated September 28, 1920) asking him to set the date for Banach's doctoral exam, to which Stanecki replied that the date cannot be set before Messrs. Steinhaus and Zylinski (the committee members) evaluate the thesis. (Aside: Math Genealogy Project lists Kazimierz Twardowski as one of Banach's advisors. On the surface of it, this makes little sense, as Twardowski was a philosopher and a logician; his expertise was far removed from what Banach worked on. However, as a professor of Lvov University, he was on the committee and signed the papers.)
She also points out that in some institutions (e.g., Jagiellonian University in Krakow), if a PhD thesis was published after the exam, the printed copy/journal offprint replaced the submitted manuscript/typescript. It is not clear if this was the case in Lvov.