Go to the node editor.
Set the shader type to world and select Use Nodes:
Add a Texture Coordinate node, a Separate XYZ, two Math nodes and a Colorramp node.
Connect the Object output of the Texture Coordinate node to the Separate XYZ node, the Z output to the first math node, change the type of the math node to Add and set the bottom value to 1, connect the output of the first Math node to the second Math node, set the type of that node to Multiply, and leave the bottom value at 0.5. Connect the output of the Multiply node to the Colorramp node and connect the Colorramp node to the Color input of the Background node.
This will give the following result: