Probably your crank position sensor. Sometimes they fail but sometimes the connectors get some crap in them and have poor contact. It's on the front of your engine close to your harmonic balancer. Pull the connector apart, clean out the connector and clean off the sensor itself with some electrical parts cleaner (the stuff in a spray bomb). Put it all back together and hopefully it'll work (mine did).
If this doesn't work the sensor may be toast or it could be something else. I see this problem frequently here so there are plenty of posts about this one.
Good Luck
Mike