"I missed you" its is also used in terms fo lossing someone or somthing. for example, I missed my target, I missed my train, same is the case here, I missed you, mean I have lost you by doing some misstake or through some missunderstanding.
And when your gf sends you a message, "I missed you", it means that she was just missing you a few minuts or a few moments befor. For example I am busy in doing some work and at the moment I miss my love and after missing him/her i send a message as "My love I missed you, therefor I am sending you the message."