I'd hook up an OBDII scan tool that shows live data and look at the reported speed. If that too, drops out, you probably have a speed sensor, wire, or connector problem. If that does not drop out, it's probably the dash gauge (or again, wire or connector to it).
You might have mentioned what vehicle make model year engine etc.