What are the water parameters? (Ammonia, Nitrate, Nitrite, pH?)
What size tank?
What other fish, if any, are in the tank?
Do you have a filter and heater in the tank?
Does the fish have any little white spots on it? Do the gills look red and inflamed? Anything odd about the fish at all?
To me, this doesn't sound like a seizure, it sounds like panic, possibly due to an attempt to get away from something it thinks is hurting it. When it hits the glass, it stuns itself. Eventually, it's going to do irreparable damage (I won't lie, it's possible that it already has, but we can't change that. We
can try to stop it if it hasn't happened yet)
That's why the barrage of questions. We can't figure out what's wrong until we know about what you've got going on. However, we're like CSI and House, once we have the facts, it usually takes us less than an hour to solve a case.

Good luck.