First of all, do you actually want to know why you're not invited, if it turns out to be something you won't be happy about and/or can't work on changing?
While it's possible that there's some underlying reason you aren't invited that is open to being improved, it may also just be easier to accept that you aren't invited, take that at face value, and move on from there.
If you do want to dig into this potential can of worms, you do have an opening
Which would be to simply let T know that
…a mutual friend of us and T asks me if I'm coming to the BBQ, since his girlfriend was invited but she wanted to know if I planned on going. This mutual friend mentioned T specifically said his girlfriend could come, and that a couple of other girls would be there too.
You can simply present this to T non confrontationally and allow T's answer to speak for how you move forward from there.
For example
Hey T, I was talking to M, and he said his girlfriend wanted to know
if I would be at the BBQ too, since she's planning on going and was
looking forward to maybe seeing me there. I was a bit confused, since
last we talked it was going to be a guys only thing, so I told M I
hadn't been invited so far as I knew, but let me know if that's not
right since I don't have anything else planned yet, and…
which can be followed with any number of statements indicating your interest, such as "I always like all of us hanging out together", "I'd rather set the time aside for you", "I haven't seen you in awhile and thought it would be a fun chance to catch up", etc.
This is one way of basically saying "look, I know you said this at the time, but now I'm hearing things from other people that conflict with that, so I'd like to know what's going on." This also doesn't lean on assumptions, particularly not negative ones regarding T, so it hopefully shouldn't put him into a place where he feels a need to act defensive, and leaves some easy openings for resolution if T wants an out for this. The last thing you want to do is make accusations based on what are no better than assumptions as to someone else's intentions especially when the situation is this unclear: focus on the impact to you of just what is immediately visible from your perspective, and keep it in that context.
For this to work, you have to genuinely approach it from a position of this being about your own confusion, versus one of making accusations based on assumptions you're arriving at due to the discrepancy. I also feel like the best approach is one of positivity (e.g. feeling like it would be fun to attend) rather one that opens up about your negative feelings such as of being left out. If you want to go there later that's up to you depending on how things go, but if I wanted this to resolve nicely I'd avoid it until it was clear that there would not be a nice resolution either way, personally.
It sometimes helps to remind yourself of that positive posturing (either just mentally or even aloud) before starting conversations where you're currently feeling some hurt based on the negative feelings of where things are at right now (left out) and any negative potential assumptions that have formed in your own mind.
T's either going to say that plans changed/snowballed out of control and you're invited/may as well come now too, that you're actually not invited because of some other reason, or he may just try to blow past it. If there's something else going on he may even get defensive anyway. All you can control in this is how you present yourself and your side, and keeping that focused in you rather than turning to assumptions about T.
If it's not one of the first two, you're going to have to either
- be more directly confrontational. I would still suggest posturing it as something more related to your own perspective rather than assigning malice or other assumed actions to T, like:
well this doesn't really make sense to me, it seems like a direct
contradiction that this is what I'm told but this is who is going,
and being faced with that contradiction is making me feel singled out, so if there's something else going on
please just be up front* with me because that's better than being left
to my own imagination on what it could possibly be
(* I used "up front" rather than "honest" because some people are quicker to take the latter as you accusing them of being dishonest)
- or you're going to have to draw whatever conclusions you want to based on the behavior that's visible and move on from there.
T could choose to invite you after being presented with the discrepancy and tell you it's just a change of plans that never got communicated back to you, and you're going to have to decide whether you trust that to be the simple truth or not, and if not what that means for your friendship, because it's unlikely that ratcheting up the confrontation in regards to that would lead to anything either more truthful or of a positive outcome between you.