Is it grammatically correct to say, "Nice meeting you?"

That expression is fine in casual speech.

However, to be grammatically correct, we should include a subject.

For instance:

It's been nice meeting you.