Heh, if it was a 7M, I'd say you're hitting the rev limiter... but unless you're running 7M electronics...
A gap issue could definitely cause such problems, but it's not something which just happens spontaneously. As I said before, a spark issue is very likely though, so checking for fouling and yes, even checking the gap is definitely at the top of the list.