If you look at the gmail URL, it's "mail.google.com". So the cookies that gmail sets are visible to google.com. It also knows the IP address you logged in from. This allows it to connect what you search for on google with your gmail user ID.
No human person (in theory) reads your emails, but software parses your emails for words and phrases that can be used to tailor ads to you.
Wouldn’t a dynamic IP address ameliorate some of their tracking—after deleting cookies of course...