How to create a gradient texture?
You can acheive this with Cycles material nodes using the 'Gradient Texture' node. 



Setting the gradient node to 'Quadratic sphere' (and with a little offset from the vector mapping node) restults in this (on a plane with uv basic unwrapping):



To control the scale of the 'Quadratic sphere' in the result above I scaled the UV's as scaling using the vector mapping node node seemed to scale it towards the corner.

For a linear gradient you can simply set the Gradient Texture to 'Linear':





For different colours you can simply use a colour 'MixRBG' node and use the factor of the gradient texture instead of the colour and connect it to the 'Fac' of the mix node.