It is worth noting that the abstract definition of a Hilbert space (as a complete inner-product space) is not due to Hilbert. Weyl recounts the history in his memorial essay, "David Hilbert and His Mathematical Work" (Bull. Amer. Math. Soc. v.50 p.612--654). In his work on integral equations, Hilbert investigated only one particular Hilbert space: the space of square-summable infinite sequences. He did not use Lebesgue integration; only later did Riesz and Fischer show the equivalence with Lebesgue square-integrable functions. Weyl adds:
I mention these details because the historic order of events may have fallen into oblivion with many of our younger mathematicians, for whom Hilbert space has assumed that abstract connotation which no longer distinguishes between the two realizations...
(There is also an apocryphal story that Hilbert attended a lecture, and came up at the end to ask the speaker, "What is a Hilbert space?")
Banach by contrast gave the abstract formulation of Banach spaces in his dissertation, along with his motivation:
This present work has the object of establishing certain theorems
that hold in several different branches of mathematics, which will be
specified later. However, in order to avoid proving these theorems for
each branch individually, which would be very wearisome, I have
chosen a different way, which is this: I consider in a general way sets
of elements for which I postulate certain properties. From these I
deduce theorems and then I prove for each separate branch of mathematics that the postulates adopted are true of it.
In other words, Banach is seeking economy of proof via the axiomatic method. His motivation is thus entirely different from Hilbert's.
To return to your original question: I have not been able to uncover any personal connection between Hilbert and Banach. The name "Banach" does not appear in the index of Constance Reid's biography Hilbert; the MacTutor entry for Hilbert does not contain "Banach", and the MacTutor entry for Banach contains only once occurrence of Hilbert, where it notes that Banach's work "generalised the contributions made by Volterra, Fredholm and Hilbert on integral equations".
However, that one sentence is probably sufficient explanation. Hilbert did his work on integral equations in the early 1900s, and it was soon developed further by Riesz, Fischer, Schmidt, and others. Banach's dissertation was written in 1920. It is hardly surprising that entering this field, Banach would pay close attention to relevant published work by one of the foremost mathematicians of the day.