Some feminists do sometimes make absurd arguments any accusation of rape should be believed, but the standard in any court is still reasonable doubt. Almost certainly, a smart woman trying to make a rape accusation against a long-time partner stick would admit to the prior relationship because attempting to deny it would destroy all her credibility.
Then, it would come down to he said / she said. You'd probably want to introduce evidence indicating why all of a sudden your girlfriend is claiming you raped her. Evidence of any mental disorders she had would probably be admissible. Details of her prior sexual history would likely be admissible (see why many actual rapes might be unreported?). If you cheated on her and she found out, you'd want to introduce evidence of that. If you recently broke up with her, you'd want to introduce evidence of that. Anything that might give her a motivation to make a false accusation against you to hurt you.
If she all of a sudden, with no motivation whatsoever, claimed you raped her, then you might be in trouble, because why the hell would she do that? On the other hand, you might not be, because why the hell would you rape someone you routinely had consensual sex with anyway? The answer is that rape's not really sexual, it's more extreme bullying / wanting to dominate someone. So you'd want character witnesses that you're a nice guy and that she's a vindictive asshole.
Either way, in a trial like that, both your names would likely be dragged through the mud in public. It would be a nightmare for both of you. And, since he said / she said usually isn't enough for "beyond reasonable doubt", she'd probably lose. This is the basis for the claim that many rapes go unreported. It's probably true. Why would a rational, self-interested person want to drag her own name through the mud to hurt someone else? The only reasons for doing something like that would be to be vindictive -- "I don't care if I get hurt too as long as he does!" -- and altruistic -- "I want to stop him from hurting anyone else." For most people, both of these motivations are better for driving actions of minor consequence than actions of major consequence.