Farah, who had the gold medal in the 10,000 agonisingly snatched from his grasp by Ibrahim Jeilan, looked in trouble early on when he grabbed a cup of water from a table on the track and rubbed it into his scalp while running at the back of the pack.
But the Somali-born athlete moved up the field at the halfway mark and dug deep over the final 600 to see off American Bernard Lagat and Ethiopia's Imane Merga in a straight sprint for the line.
Merga was later disqualified for stepping inside the curb and countryman Dejen Gebremeskel was promoted to the bronze medal position.
Farah, the fastest man in the world over 5,000 and 10,000 coming into the championships in Daegu, won in a time of 13 minutes 23.36.
"I'm very proud, I can't believe it. It hasn't quite sunk in," Farah - who moved to London aged eight - said. "I came so close in the 10,000. I just had to try and dig in. I just had to try and relax and get it right. "It's a great feeling, it's an amazing feeling."
Farah's tactics had been called into question when he struck for home early in the 10,000, but on Sunday he got it just right, moving on to the shoulders of the leaders with two laps to go and kicking hard with his blazing finishing speed.
Eyes wide and teeth gritted, Farah kissed his fingers and spread his arms wide in celebration, giving Britain their second gold medal in Daegu.
His victory came as a huge fillip to the British camp, who had come under pressure for failing to live up to expectations with less than a year to go before the London Games.
Farah's victory, coupled with Welshman Dai Greene's gold in the 400 hurdles on Thursday, will have given British athletes an injection of confidence.
His coach Alberto Salazar said Farah had run the right race.
"Right before the start of the race I told him to be patient," said Salazar. "If you're not patient you lose."
American Lagat, the 2007 world champion, could not get a clear run coming off the final bend and the 36-year-old had to settle for silver.
"I got boxed in and by the time I got out Farah had already won," said Lagat. "He was the strongest tonight."
- Related links