I've seen this happen from some odd things before. One, it was one of the coolant sensors acting up, making the engine think it was on fire. Another time, the MAF was filthy. On this Taurus I worked on, it was the fuel pressure regulator.
I'd also make sure you're not getting jerked around with the gas. There was a station near me that just got in trouble for having 87 in all of the tanks, and selling it as premium. This ethanol blend crap doesn't help, either.