In basic terms, general relativity is based on Einstein's equivalency principle. It states that in a closed environment, there is no way of distinguishing between the effects of gravity and of a constant acceleration. Imagine if you were in a box, and you knew that box was either sat on the surface of the earth or accelerating upwards through space in zero gravity at a rate of 9.8 metres per second squared. There is no experiment that could be conducted inside that box to determine which was true.
So imagine shining a laser sideways in the accelerating lift, the light would continue to travel in a straight line while you accelerated upwards, so to you the light would appear to curve downwards. The equivalency principle suggests that gravity therefor must have the same effect on light. However it was already known that light cannot travel in a curve but must always travel in a straight line.
This led to the definition being changed to "light will always travel the shortest distance between two points". In Euclidian geometry this is a straight line but not in Non-Euclidian geometry. Imagine a globe vs a map, the shortest distance between two countries on a map will be a straight line, but put this on the globe and it will become a curve. So Einstein theorised that space and time are not separate but are in fact inextricably linked, or "related", as space-time, which becomes warped by large masses such as planets, stars or black holes to create gravity. Light will always curve along these warps of spacetime which can only really be viewed with very high gravity such as massive stars or black holes.
From this it was also noted that as mass stretches space-time causing distance to stretch, so to must time, which is why the larger a gravitational field an observer experiences, the slower time will move for that observer. (Basically the whole plot of Interstellar).