The lawsuit filed in May accuses Google of illegally opening and reading emails in violation of California's privacy laws and federal wiretapping statutes.
Google says it targets advertising based on words that appear in Gmail messages but that machines, not humans, scan emails.
It said in court papers that email users must expect that kind of "automated processing" of their emails and that the lawsuit is seeking to "criminalize ordinary business practices that have been part of Google's free Gmail service since it was introduced nearly a decade ago."
Privacy watchdogs have complained about the practice from the start, and yet Gmail has continued to grow in popularity.
Chief critic is Microsoft, which made email electronic scanning a key part of its "Scroogled" campaign this year: "Your email is nobody else's business. But Google makes it their business. Even if you're not a Gmail user, Google still goes through your personal email sent to Gmail and uses the content to sell ads."
That tactic prompted technology blog TechCrunch to comment: "Hey Microsoft, 2004 called. It wants its privacy outrage debate back."
Legal experts say the plaintiffs would have a tough time making their case.
"I don't see this lawsuit having a lot of traction," University of Washington law professor Ryan Calo said.
But that does not necessarily mean the practice does not harm consumers, he added.
"I would say just because the law doesn’t address email scanning for the purposes of targeting advertisements, that does not mean there is no harm to consumers," Calo said.