You can’t get anybody to do anything in the sack if he or she is unwilling to do it. Your girlfriend’s pain may be due to your penis being too big for her anal opening – basically you’re not a good fit. In this case, little can be done since the anal area does not have the elasticity that the vaginal canal has in terms of expansion during sexual arousal.
Your girlfriend’s pain may also be due to tension and anxiety, including a lack of foreplay to get the area warmed up. If she’s willing to test the waters again, be sure to get her sexually excited with at least 20 minutes of foreplay, helping her to have an orgasm via vaginal intercourse or oral sex first. This will result in her pelvic region becoming relaxed, and allow for more feel-good sensations in the anal area.
You can also help her anal opening to further relax by seducing it with some finger action, taking your time in getting her used to the sensations. Encourage her to take deep breaths and communicate with each other about what feels good and what doesn’t. If she’s in pain at any point, stop and withdraw. Every step of the way, make sure that you’re using lube. For more detailed instruction on how to get a lover or yourself warmed up for anal sex, be sure to read Tristan Taormino’s “Expert Guide to Anal Sex.”
All the best!