A good account is Weinstein, Max Born, Albert Einstein and Hermann Minkowski's Space-Time Formalism of Special Relativity. They did no have much of a relationship, what it was is well-summarized by Sommerfeld:
"Strangely enough no personal contacts resulted between his teacher of mathematics, Hermann Minkowski, and Einstein. When, later on, Minkowski built up the special theory of relativity into his 'world-geometry', Einstein said on one occasion: 'Since the mathematicians have invaded the theory of relativity, I do not understand it myself any more'. But soon thereafter, at the time of the conception of the general theory of relativity, he readily acknowledged the indispensability of the four-dimensional scheme of Minkowski".
Minkowski was one of Einstein's professors of mathematics at the Zürich Polytechnic (1896-1900), but Einstein was not interested in mathematics at the time, and skipped most of his lectures. As Minkowski himself told Born, "in his student days Einstein had been a real lazybones. He never bothered about mathematics at all". Einstein confirms this in his Autobiographical Notes:
"I had excellent teachers (for example, [Adolf] Hurwitz, Minkowski), so that I should have been able to obtain a mathematical training in depth. I worked most of the time in physical laboratory, however, fascinated by the direct contact with experience. The balance of the time I used, in the main, in order to study at home the works of Kirchhoff, Helmholtz, Hertz, etc."
In 1902 Minkowski moved to Göttingen. According to Born, he was interested in electrodynamics since 1905, but the interest was based on the works of Hertz, Fitzgerald, Larmor, Lorentz, and Poincaré. The now famous spacetime formalism was developed in 1907-08, with the first glimpse of it described in the lecture The Relativity Principle on November 5, 1907. It treats the principle in terms of ether, and names Lorentz as its discoverer. Einstein is credited with clarifying it.
A detailed description of the spacetime formalism first appeared in the Minkowski's December 21, 1907 lecture The Basic Equations for Electromagnetic Processes in Moving Bodies, and was published in April, 1908, in Göttinger Nachrichten. It was the only publication on the subject before his death on January 12, 1909. But it gained traction already after the September 12, 1908 talk at the Cologne Congress. Einstein was supposed to meet Planck there, but ended up not coming. His attitude towards Minkowski's formalism is politely expressed in a 1908 paper with Laub:
"In a recent published study Mr. Minkowski has presented the fundamental equations for the electromagnetic processes in moving bodies. In view of the fact that this study makes rather great demands on the reader in its mathematical aspects, we do not consider it superfluous to derive here these important equations in an elementary way, which, is, by the way, essentially in agreement with that of Minkowski."
According to Sommerfeld, Einstein was even more blunt privately. So most of the early work on general relativity owed very little to Minkowski's formalism, if anything, see How was Einstein led to make a contact with Differential Geometry for his theory of General Relativity? Einstein's attitude only changed in 1912, when he wrote to Sommerfeld on October 29:
"I am now occupied exclusively with the gravitational problem, and believe that I can overcome all difficulties with the help of a local mathematician friend [Marcel Grossmann]. But one thing is certain, never before in my life have I troubled myself over anything so much, and that I have gained great respect for mathematics, whose more subtle parts I considered until now, in my ignorance, as pure luxury! Compared with this problem, the original theory of relativity is childish".
But by then his main influence was tensor calculus through Grossman and Levi-Civita, with whom he corresponded.