Deepak,
Was this your first time or have you been successful at penetrating your girlfriend in the past? In both instances, there is not much cause for worry. If it was the first time, obviously you were stressed out. You mind was occupied with other problems such as her possibility of getting pregnant, would you be able to satisfy her etc etc.
If you have had sex in the past, this could be a stray incident. Since the plan was to have it at her place, obviously the surroundings were new to you and there is always a fear that some of her family member may srop in at an inopportune moment. Never a good thing, when you have your pants down!
Since you did get an erection later on, there is no cause for worry. The worrying factor is your girlfriend's comments, on your inability to perform. Either she was naive or callous.