Made a VERY stupid comment to my girlfriend, how do I get her to forgive me?

Let me start off by saying I love my girlfriend, and I love her for who she is. Anyway this happened yesterday after we had lunch with a few of my friends. The group included a friend of mine who is beautiful, she's armenian and she was telling us how she was still a virgin and would never have sex with a guy she didn't love, much less have a ONS. Needless to say my girlfriend has done a few stupid things in the past that I've forgiven. During lunch I praised her for her discipline and told her she was a rare gem that would make a man very happy one day. Apparently my girlfriend didn't like that very much and when we were driving home in the car she acted like a child and started insulting my friend saying she was probably a slut and that se was a stuck up bitch. I got really annoyed and that's when I f***ed up. It was in the heat of the moment but I told her," you're just jealous she can give a guy like me what you never can." she was really hurt, she started crying in the car and I was like "wtf act like an adult and stop crying." So I dropped her off and Haven't talked to her since then. She was my first and I was her third or something, I don't like to talk about her past. I could use some advice on how to apologize, I honestly don't know what to tell her, so please any advice would be greatly appreciated!
Made a VERY stupid comment to my girlfriend, how do I get her to forgive me?
Post Opinion