Step 1
Make a new document 100x100 and fill it any color I chosed blue. Now make a new layer on it and draw the shape you want it to be animated or make a selection of anything you want to animate cut it and paste it down in a new layer). If you chosen to draw the shape yourself make a new layer and with the selection you made(using the poligonal marquee tool, rectangular marquee tool, the pen) fill it with the color of the background or change layer style to overlay if you chosen a picture.
This the shape I used that I filled it with the same color as the background:
Step 2
Now make a new layer take the gradient with the folowing settings
go from right to left not to much the result should look similar to this :
Step 3
Ok check out the layers order --Background -Shape - Gradient if that's ok click the last layer the gradient one and press Ctrl+G this will make the gradient layer seen only in the shape layer
Step 4
Go to Image Readyduplicate the first frame, check the gradient layer position. In the first frame it should be at the beginning of the invisible shape and in the second layer should be at the end of it.then press the create motion I used 5 frames use how many you want it to move.
This is my final result:






