Cycles not rendering image or movie clip used as background in the viewport
Images (of movie clips) used as background in the 3D viewport are primarily meant to be used as reference and will not render.
Here are a couple of alternatives:

Using the compositor

Add an Input&gt;Movie Clip node, and use an alpha over node to compose the render layers over it.

For single images use an Input&gt;Image node.

If you are using cycles make sure that you enable Film Transparent, so that the rendered layers render with a transparent background:
ver 2.8X and newer

(for ver 2.79 and earlier)


Without the compositor

Without using additional geometry or compositing, you can use the image as background for the world. Set the Texture coordinates to Window.

In this case disable Film&gt;Transparent