Gomez launched his victory speech in Spanish, as he did in campaign ads and on the stump in a state where Hispanic voters are a small but growing slice of the population.
In the Republican campaign he overcame a controversy over a letter he sent to Democratic Gov. Deval Patrick in January in which he asked to be appointed interim U.S. senator and said he supported Obama's gun control and immigration policies.
Sullivan, an early favorite among conservative Republicans, touted his law enforcement and national security background, having helped investigate the Sept. 11, 2001, terror attacks and the failed attempt to blow up an airliner using shoe bombs.
But the 58-year-old Abington resident collected the smallest amount of campaign contributions of the three GOP candidates and was unable to run any statewide TV ads.
"I really thought we were going to pull this off. We didn't, but that's OK," Sullivan told disappointed supporters, vowing to throw his support behind Gomez.
Winslow, 54, a former judge from Norfolk who served as chief legal counsel in Romney's administration, finished third despite putting more than $150,000 of his own cash into the race.
"I came into the race thinking I could mop the floor with Gabriel Gomez," Winslow said Tuesday. "I was proven wrong."
While Gomez easily outraised his challengers he also loaned his campaign at least $600,000.
Markey called on Gomez to sign the so-called "People's Pledge" that Brown and Warren signed during their Senate contest last year designed to discourage television, radio and Internet ads by outside groups.
The primary campaign, part of the third U.S. Senate race in Massachusetts in the past four years, was marked in part by the relatively low voter turnout. That turnout was likely hampered by the marathon bombing and the search for the bombers, which consumed the attention of residents across Massachusetts.
"There are a lot of people who are still down and not wanting to participate in things," said Holly Zaitchik, a retired Boston University professor, after casting her vote for Markey in Wayland. "It's disheartening."
Gomez supporters said they were hopeful he would have as much or more appeal to Democrats and independents as Brown did in his first Senate campaign.
"He's even fresher than Scott Brown. It will be difficult but doable," said Jami Gregory, 50, of Hingham.
Richard Heos, an independent from Woburn, will also be on the June 25 ballot.
Patrick named his former chief of staff, William "Mo" Cowan, to fill Kerry's seat on an interim basis until after the special election.
Associated Press writers Tracee Herbaugh in Abington, Amy Crawford in Cohasset and Jim Morrison in Boston contributed to this report.