If the computer sees a fault, it may put the transmission in failsafe (3rd gear only). Turning the vehicle off and then on again should reset the failsafe.
A check of the ECM (engine control module) and TCM (trans control module) trouble codes should provide a hint as to the cause. The most common culprits are the input and output speed sensors.