Relation of General Relativity to Dark Matter and Dark Energy 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? 
 A: There are several observations suggesting the existence of Dark Matter. Some of them need General Relativity to be properly described, for others Newtonian Gravity is enough. Whatever theory is used, Dark Matter is a good explanation to the observations.
For example, the rotation curves of stars in a galaxy are not falling off fast enough at big radii, so Dark Matter is used as an explanation. The rotation curves can be calculated with General Relativity of course, but Newtonian Gravity works equally well.
On the other hand, gravitational lensing requires General Relativity for doing the calculation and still Dark Matter is needed to explain the observations.
A: 
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?

First, good question.   It's a very interesting bit of history.  Photon's answer touches more on today's science, I'll go more into the history.   Basically, the short answer is no.   The longer answer is, not really, but a small relation, perhaps.
Einstein didn't predict dark matter.   He didn't and his theories didn't even guess in the direction of it.   Einstein's general relativity did imply the existence of black holes though, which could have been, at one time, considered part of dark matter.  More on that later.
It's worth mentioning, when Einstein published his 2 relativity theories (special - 1905 and general - 1915), we didn't even know there were other galaxies.  The discovery of other galaxies came in 1923 and it's not hard to see why, once other galaxies were discovered, that they would be of significant interest.  Hubble discovered Red Shift in 1929 and Oort made his discovery in 1932 and Zwicky his in 1933 (more on that below).
There were two key pieces to the missing galaxy mass puzzle.
First observed was First was that the outer stars orbited faster than the ones closer to the center, called the Galaxy Rotation problem discovered in 1932 by Jan Hendrik Oort.  I remember reading about this in the science times as late as the 1980s.  It remained an unanswered puzzle for decades that many scientists looked into with better and better telescopes after Oort.   It remained a puzzle for a long time.
Second, just 1 year later, Fritz Zwicky calculated the expected mass of a near-by galaxy and found it was much too low to explain the orbital speed (as you mentioned in your question).  Zwicky's calculation was that the apparent mass was 400 times too low, which is needless to say, enormous.   It's not hard to figure that there's some extra mass that might not be seen.   Stars that have used all their fuel and burned out, large planets, clouds of dust, meteors, asteroids, etc, but it's very difficult to explain away 400 times too little mass.  
Both of those observations are equally unexplained using Einstein's gravity or Newtons.   There's very little difference for most orbital calculations.  It only real difference starts to come in with very high gravity and enormously fast orbits.   For these Galaxy mass calculations, there's essentially no difference.
Now, it's not hard to imagine some hugely massive objects on the inside of a galaxy and super-massive black holes were discovered later, but that only helps with Zwicky's observation, not Oort's.  For Oort's discovery to work, you need lots of mass outside the galaxy and that was an enormous puzzle that Einstein's relativity didn't help one bit.
Now, the loose tie-in, was that some of the mass in galaxies that we can't see is black holes, which Einstein's general relativity predicted though Einstein personally didn't believe in them.   But that's a small tie-in.   
Dark Energy is something else and probably belongs in another question, if you want to tie Dark Energy to Einstein's cosmological constant, that's doable, but I don't put much stock in that tie-in myself.   I think Einstein was fudging his physics to try to make something work and the fact that his guess resembled what was later observed was more dumb luck than good theory.   Einstein's two relativity theories when he published them were absolutely brilliant and probably the greatest work of the 20th century.   I don't consider his cosmological constant good science, in my humble opinion.   
Dark Energy also has absolutely nothing to do with Dark Matter, except 4 letters. :-)  They're completely different.
A: To say that general relativity predicted dark matter is something of a stretch, but it is not entirely wrong either. Originally it was not a prediction but rather an auxiliary hypothesis introduced to account for theoretical discrepancy with the observed motion of stars in galaxies. In other words, it was analogous to the discrepancy in the motion of Uranus, or in the precession of the perihelion of Mercury, with what was predicted by Newton's theory of gravity. Responses to Uranus and Mercury anomalies were correspondingly predictions of hypothetical planets Neptune and Vulcan, and while the former worked out, the latter famously did not. What happened with dark matter was analogous to the situation with Neptune and not with Vulcan, and in this sense general relativity predicted the presence of extra matter since we can reliably observe it now rather than just infer its existence. There were also alternative responses, like MOND, that did not work out, or at least they worked worse than the dark matter. 
The remaining issue is that we do not yet have a confirmed theory of dark matter, as we have say for EM or Higgs field. That was not an issue with Neptune because although originally no one knew what it was made of either, it was reasonable to assume that it was some kind of ordinary matter. The peculiarity with the dark matter is that we can rule that out, so until a theory of it is worked out and confirmed we can not quite say that the presence of dark matter has been established, and the prediction confirmed.
