There was relief for American sprinter Tyson Gay after he safely negotiated his first competitive 200 metres for two years and compatriot Carmelita Jeter beat Jamaica's Olympic 100 champion Shelly-Ann Fraser-Pryce for the second time in four days.
Britain's Farah, whose wife gave birth to twin girls on Friday, had to produce his trademark turn of speed on the final lap of the distance race when Italian Daniele Meucci suddenly attacked on the outside.
With a wicker replica of Farah in his celebratory 'Mobot' pose overlooking the track, the London Games 10,000 and 5,000 metres champion kicked and pulled away from the field on the home straight, sending the stadium wild, to win in eight minutes 27.24 seconds. Meucci was second in 8:28.28.
"I love competing on British soil, it's what it is all about, getting the support from everyone and I just appreciate everyone being with me all the way," Farah told reporters.
"It hasn't been the easiest week because my wife gave birth to two little girls, so it hasn't been easy coming here and getting this out the way.
"What a year I've had, it will never happen again like this - two twins, two gold medals," added Farah who has said he will give one to each girl.
Former world champion Gay started well in the 200 but tightened up down the home straight and finished behind Jamaica's Nickel Ashmeade, who won in 20.12.
"It was pretty good, interesting," Gay, second in 20.21, told the BBC.
"It was my first race in two years and it feels good to finish," added the Olympic 4x100m silver medallist, who had concentrated on the short sprint in recent seasons after suffering a series of injuries.
Racing next to her great rival, Jeter eased ahead of Fraser-Pryce early on in the 100 metres and never looked like being caught as she won in a meeting record of 10.81.
Twice Olympic champion Fraser-Pryce, wearing a black and yellow ribbon in her plaited hair, was second (10.90) as she had been in Lausanne on Thursday.
There were no nervous twitches from Aries Merritt in the 110 hurdles as the Olympic gold medallist, who was disqualified for a false start in Lausanne, held off world champion Jason Richardson for victory in 12.95.
Olympic high jump champion Ivan Ukhov suffered a second successive Diamond League defeat when he finished behind London bronze medallist Robert Grabarz of Britain, who cleared 2.32.
There was also disappointment for Britain's long jump gold medallist Greg Rutherford who had treatment for a groin problem during the competition on Sunday and could manage only third behind Russian Aleksandr Menkov (8.18)
The Merseysiders twice went ahead through Martin Skrtel and Luis Suarez on manager Brendan Rodgers' home debut, but failed to hold the lead on both occasions with costly errors at the back gifting Yaya Toure and Carlos Tevez goals.
It means Rodgers' wait for a first Liverpool victory will wait another week after his side lost 3-0 to West Bromwich Albion last weekend.
After a sluggish start, Liverpool began to dominate proceedings and should have taken the lead when Fabio Borini sent a cross from impressive 17-year-old Raheem Stirling just wide.
Carlos Tevez went close at the other end, his shot from an acute angle hitting the post and spinning back into play.
Manchester City's Vincent Kompany nearly steered the ball into his own net when an attempted clearance from a low Steven Gerrard drive went narrowly over the crossbar.
The hosts got the goal their pressure deserved from the resulting corner however, with Gerrard's cross being met with an unstoppable header from Skrtel on the edge of the six-metre box on 34 minutes.
City's equaliser was against the run of play when Toure took advantage of Pepe Reina and Martin Kelly's failure to clear a Tevez cross, sweeping the ball into the net on 63 minutes.
Liverpool took the lead back barely a minute later when below-par striker Suarez hit a stunning free-kick from 20 metres out, after Jack Rodwell was harshly judged to have handled a Gerrard shot.
City, who came from behind to beat Southampton 3-2 last weekend, again pulled level with Tevez's 100th goal in English football when Skrtel went from hero to villain, his poor backpass being intercepted by the Argentine who calmly rounded Reina to roll the ball into the empty net on 80 minutes.
In Sunday's early match, Arsenal and Stoke City played out a 0-0 draw at the Britannia Stadium.
The result means Arsenal are still searching for their first goal of the season after they were held to a scoreless draw by Sunderland last weekend
The shock reverse ended the Spanish champions' unbeaten run of 24 league matches, their longest in 15 years, and was the first time they had lost in La Liga after leading at half time in more than five years.
Coming after last weekend's 1-1 draw at home to Valencia, it also left them five points behind Barcelona after two matches, a significant gap in a competition where the arch rivals often go toe to toe until the season finale.
"Real was very bad, an unacceptable match," a grim-faced Mourinho told a news conference while refusing to single out any player in particular for criticism.
"The only message I want you to take away tonight is that it was a deserved defeat for us," he told reporters.
"This was a match in which the defeat was absolutely deserved. More than two matches with just one point it was a horrible match."
Getafe's equaliser just after halftime, when Juan Valera slipped marker Sergio Ramos and nodded past Iker Casillas from a free kick, would have particularly irked Mourinho given the amount of work the players have been doing on dead ball situations in training.
They also conceded a header in similar circumstances when leading 1-0 against Valencia.
"We have been doing more work than ever on dead ball situations and there is nothing more we can do," Mourinho said.
"We cannot work any harder on organisation," added the Portuguese.
"That goal and the one we conceded against Valencia were two ridiculous goals."
The last time Real stayed winless after two La Liga matches was in the 2001-02 season.
They finished third in La Liga and lost the King's Cup final to Deportivo Coruna but won the Champions League final against Bayer Leverkusen