What the heck is WRONG with these people?
They told the recent grad not to invite you? And they're telling you to give a gift?
Who died and made them the boss? And their etiquette is tremendously challenged.
And their judgment. And their human decency.
Avoid talking with them at all about this.
Avoid the gift thing--be Teflon.
I do like JenJay, "please don't speak for me."
And that's a good point about saying, "If I give her a gift, that makes it really awkward for Recent Grad."
And if you can slide away, say, "Well, I know that you're aware I wasn't invited to the party, because you -told- her not to invite me. But I took that to mean she and I aren't close. And since we aren't close, I won't be pitching in on the group present."
If they think you should give one on your own, say Teflon things like, "I've got it under control."
Give the recent grad a card and your best wishes, warmly--remember that she wanted to invite you. And the only reason she didn't is that these pushy people who think they know everything--and are the Etiquette Boss of everyone--told her not to.