If others in your department were not invited, I would say YABU and a tad sensitive.
If you were THE ONLY ONE from your department not invited, then YANBU and like Aeroflotgirl said, is very insensitive and mean especially as others obviously knew you were not invited otherwise they wouldn't have lied.
I am sort of in your boat this morning too. I 'knew' there was a party last night and current and ex-colleagues were invited. The colleague who hosted it is a good 'acquaintance' of mine (changed to acquaintance because quite clearly, NOT her friend). I knew the party was going ahead because she was talking about it a few months ago when I saw her and when I went into work (currently on leave), I saw a poster about it with names of individuals who were attending, including those who had moved onto pastures new over a year ago. The 'expiry date' for notifying the organiser (birthday party) had expired by the time I saw it and I did wonder why 'acquaintance' didn't mention it; especially as she had my mobile number and had been periodically in contact with me prior to the party - except the past 12 weeks oddly! I saw it on FB last night via a mutual friend (birthday girl not on FB) and I left a message of: "Didn't know it was xxxx'x birthday party. Hope you all had a good time". it gives the message of, I know what you have gone and done, i have acknowledged the party that was kept from me but I am taking a mature stance and wishing everyone well even though I am seething inside that I have been left out, forgotten and ASSUMED that I wouldn't want to come due to having had a baby in the past few months
A few years ago there was a Christmas party organised at work (a lot of them different colleagues as they've all moved on) and because there was only 15 places, the organiser then went and asked her closest colleagues and chosen few FIRST and then put the list on the staffroom noticeboard with only 2 places left. Another colleague was told and in the middle of lessons (I was present when this occurred as I was on my break) walked into the staff room to put her own name down and another colleague's. There was uproar in the school! (I work in a school, can you guess???) A lot of staff members - the majority - were angry that we had been left out and wasn't a 'first come, first served' whereas me and others were cross because only one venue had been chosen. So said party was cancelled and a colleague who wasn't invited found a venue only a few doors down form the original that could host EVERYONE. Everyone who wasn't invited to the first went, whereas those who were chosen to go to the first venue and then 'didn't' because the HT cancelled it so we thought didn't attend. But a few days later, I asked HT about his plans and he said he was going out as it was his DD's birthday and he never misses her birthday (HT was one of those invited to the first venue) but I realised that that night was the night they were supposed to going out to the first venue. I then bumped into another colleague and I said "Enjoy your night at xxxxx" and she blushed and said "oh". And the secretary of the school then talked about how she drunk too much at the party on Friday night and others were joining in. I said "Thought it was cancelled, clearly lied didn't you?" The room fell silent as they were found out and I walked out.
Just wanted to say, you're not alone. There are some selfish and mean people who will take every opportunity to ignore others, leave people out and make them feel like outcasts.