not shifting?

so today i was on my way to work and i get to a stop light and the light turns green i start accelerating and felt as if my car had 1 horsepower lol... i push the pedal a little more and no gain in speed still. i looked at my guages and then i see the little light that shows what gear im in was on 4?? at 10mph so i kept tapping the gas and finally shifted and never happend again. anyone know if this is a serious problem? what could be wrong here?