_gat is a Google Analytics cookie, used to throttle (i.e. limit) the request rate to Google Analytics. It has a default expiration of 1 minute.
_ga is a Google Analytics cookie used to distinguish users and has a default expiration of 2 years.
_gid is a Google Analytics cookie is used to distinguish users and has a default expiration of 24 hours.
NID is used as a preferences cookie for most Google users. A browser sends this cookie with requests to Google’s sites. The NID cookie contains a unique ID Google uses to remember your preferences and other information, such as your preferred language (e.g. English), how many search results you wish to have shown per page (e.g. 10 or 20), and whether or not you wish to have Google’s SafeSearch filter turned on. Google also uses NID help customise ads on Google properties, like Google Search. For example, it uses such cookies to remember your most recent searches, your previous interactions with an advertiser’s ads or search results, and your visits to an advertiser’s website. This helps Google to show you customised ads, and it has a default expiration of 6 months.