I was reading an elementary book on dark matter (in fact, a historical perspective) and there were mentioned how the scientific community react to the idea of dark matter proposed as a solution to observed discrepancy between the actual mass of astronomical systems and the predicted mass from Newton's theory. I was wondering where Einstein theory stands in relation to dark matter, did it somehow predict it, or does dark matter prove the incompleteness of Einstein's theory? And what about dark energy?
Dark matter was originally hypothesised because there is a greater degree of rotational energy in galaxies than visible matter would allow for - crudely they rotate so fast that they ought to spin apart and therefore it was hypothesised that there is an additional source of gravitational force in some form of invisible matter.
This is not as a result of a discrepancy in Einstein's General Relativity. Newtonian gravitation is a very good approximation of Einstein's GR at most ordinary scales and energies and this is true in this case also.
I am not sure, exactly, what your "what about dark energy" question means, but assuming you mean, does this imply an incompleteness in GR, then again the answer is no, or at least not necessarily, but it's a more subtle point.
Dark energy is the hypothesised source of the energy that causes the universe to expand at an accelerating rate. It can be inserted as a term into the field equations of GR (other explanations of DE exist though) - but that is just a mathematical term, rather than an explanation of the physicality of it.
Einstein originally inserted such a term into his solutions - to predict an essentially static universe. When it was shown that the universe was expanding he described this as his "greatest mistake".
The evidence for the accelerating rate of expansion is relatively recent and came long after Einstein's death so he never lived to see the essential idea - of a "cosmological constant" in his equations - revived.
This explains more - https://en.wikipedia.org/wiki/Cosmological_constant