World nodes keyframes does not work
If you add a Value Node to your graph, you can type #frame in the value field which will make the value correspond with the current frame as the frame changes. You could combine this with math nodes to set the timing and the direction (toward beginning or toward end) of the fade that you want. This example fades the background from bright white (At frame 0) to full black (at frame 250):