1. I met her in mid July.

2. I met her in middle July.
3. I met her in late July.
(Are all grammatical? Which one is correct #1 or #2?)

#1 and #3 are correct. To use "middle" in #2 add words to make it "I met her in the middle of July," which is more correct.

Thank you.

In the middle of July
at the middle of July

(Do we have to use 'in'? What about 'at'?)

In the middle of July is better. For information, common usage is to hyphenate mid-July. At indicates a precise point, and it is not used much. You can use it...

At the middle of May, school is out.

but the more common usage is "in".

All the sentences you provided are grammatically correct. However, the more commonly used expression is "I met her in mid-July" (sentence #1). "Mid-July" means the middle part of the month of July.

On the other hand, "middle July" (sentence #2) is less commonly used, and it may be ambiguous because it could refer to either the middle of the month or the middle of the season. In order to avoid confusion, it is better to use "mid-July" when referring to a specific point in time.

As for "late July" (sentence #3), it means the later part of the month of July, usually towards the end.

In summary, while all three sentences are grammatically correct, "I met her in mid-July" (sentence #1) is the most commonly used and precise expression to describe a specific point in time within the month of July.