Very likely yes. They track IP number on desktop to detect suspicious logins. IP numbers would be less effective on a mobile device so it makes more sense to use the IMEI.
If a 3rd party developer called android.telephony.TelephonyManager.getDeviceId() to get this I believe the user would get asked for permissions - however Google is not a 3rd party when it comes to android.
edit: Talking about the gmail app more so than gmail.com via browser. Firefox to gmail.com I cant see how they could get anything else but your IP address.