Depends on the situation. Sometimes yes, sometimes no.
Depends on why I wasn't invited, what the event was, and a host of other variables. There have been, for example, a lot of cousin's weddings that I haven't been invited to that I've still sent gifts to, just because they're my cousins. And I once sent a "new baby" gift to an old college friend I hadn't heard from in years simply because someone had told me that he was a new dad. I got a nice thankyou note from his wife, but nothing from him, so I let it go at that. I also had a good friend (or, at least, thought he was) who had a huge birthday party where he invited pretty much everyone I knew except for me. I had all sorts of people ask me why I wasn't there. I asked
him why he didn't invite me and he said he just figured I'd hear about it and show up. I still have his present. I just figured he'd hear about it and show up, but so far ... nope.