Offhand, I know Gmail is picky with older Mail clients.
I spent ages at one point trying to get Mail on an older version of iOS to connect, and finally had to tick a box in Gmail via a browser saying Allow insecure connections or something like that.