Ethiopia's 5,000 metres Olympic gold medallist Meseret Defar had an easier time in the women's race finishing in 1:07.25 in a course record and more than a minute ahead of American Shalane Flanagan.
Farah, winner of the 5,000 and 10,000 at the London Games, ran with Gebremariam for the final few kilometres before turning on the speed over the last 200 metres to beat the 2010 New York marathon champion by a second.
"I was working pretty hard. It was an effort. I was really pushing it," Farah told reporters.
"It was definitely a fast course and with good guys pushing the pace."
The previous men's course record was 1:01.07, set by Kenya's Martin Lel in 2010, and the women's was 1:07.36 run in 2011 by New Zealand's Kim Smith.
Lel, a three-times London marathon winner, was fourth on Sunday some three minutes behind the leading pair.
Farah will run half the London marathon in April prior to making his debut over the full distance in 2014.
Looking ahead to the longer race the 29-year-old said: "It is going to be a completely different ball game. It does not necessarily mean that I am going to be amazing at it, I've got to go out there and do it. I am quite excited."