There is no written record that Einstein ever published those words, however, if one understands what Einstein would have meant by those words, the claims by those who say that they received informal communications from Einstein essentially stating that idea are very credible.
Einstein refused to accept quantum mechanics (which often conflicts with Relativity). Quantum theory asserts that, at the lowest levels, matter and energy act randomly. Predictable behavior only occurs at larger scales. We can see this concept when tossing coins. Toss a single coin (or even two or three) and the outcome of a single experiment (or even two or three) is highly unpredictable. Toss a million coins, even once, or toss even a single coin a million times, and the outcome is quite predictable. With near certainty, you can predict, within a tiny margin, 500,000 tails.
At the lowest levels, matter and energy behave unpredictably. However, all of these tiny and random occurrences create quite predictable macro results. If you walk into a wall, you can count on bouncing off of it and experiencing some pain.
To support quantum mechanics, experiments were designed that, when done the same way, over and over again, would produce the same results if Einstein was right, and different results if the advocates of quantum mechanics were right.
The quote from Einstein simply was calling quantum mechanics "insanity" because those advocating quantum mechanics would do the same thing over and over again, expecting different results from the experiments.
Einstein was wrong.