Why was Nick invited to Gatsby's party instead of just being expected to come in The Great Gatsby?
This is something we only discover later on in the text. You are right, however, to draw attention to the strangeness of of the way in which Nick, by his own estimation, is one of the few guests who were actually formally invited to the party that he went to at Gatsby's house. He tells us in Chapter Three just how he received the invitation:
I had been actually invited. A chauffeur in a uniform of robin's egg blue crossed my lawn early that Saturday morning with a surprisingly formal note from his employer: the honour would be entirely Gatsby's it siad, if I would attend his "little party" that night. He had seen me several times, and had intended to call on me long before, but a peculiar combination of circumstances had prevented it--singed Jay Gatsby, in a majestic hand.
The intentional nature of Nick's invitation must mean that there is some kind of reason for Gatsby wanting him there, and the way in which, when he starts talking to Gatsby, Gatsby is very friendly and invites Nick to go flying with him, might lead us to believe that there is some kind of hidden motive to Gatsby's actions. Later on, we discover that this is because Gatsby had found out that Nick was Daisy's cousin, and thought he could use a friendship with him to get to her.
It's never entirely clear why Gatsby invites Nick with a personal invitation, but the story suggests it's because Gatsby has discovered that Nick knows Daisy. Nick would be of particular interest to Gatsby as he lives next door, the perfect place, in Gatsby's mind, for he and Daisy to have their first reunion after a five-year separation. After chatting for a few minutes with Nick at the party, and apparently deciding he's acceptable as a go-between, Gatsby holes up with Jordan for about an hour. During that time, as Jordan later relates, Gatsby tells her his story and prevails on her to introduce to Nick the idea of inviting Daisy over, but without telling her that Gatsby will also be there. Jordan tells Nick that Gatsby had long been asking people "casually" if they knew Daisy, and that "I was the first one he found."
Several clues lead us to believe that Gatsby definitely knew beforehand of Nick's connection to Daisy, though the two don't discuss Daisy at all at that first meeting. The clues are the formal invitation, Gatsby singling Nick out for conversation, and the speed with which Gatsby has his tete-a-tete with Jordan, all indications that Gatsby had a plan in mind ahead of the party.