The Beirut victory was the first in five matches for the Socceroos, who need a win against Jordan in Amman next Tuesday to keep Asian champions Japan in sight at the top of Group B in the fourth round of Asian qualifying.
The Japanese are threatening to run away with the group after taking seven points from their first three matches, five clear of Australia and Iraq who both drew their opening two encounters.
Australia ignored the disruption of the floodlight failure which stopped the game four five minutes in the first half to claim their first win since they beat Saudi Arabia in February.
Cahill, who missed the 3-1 friendly defeat to Scotland last month, got them off the mark by leaping above his marker to head home his 25th international goal in the 19th minute.
"It was important that we started strongly and we did that," goalkeeper Mark Schwarzer, who became the first Australian to win 100 international caps in the match, told Fox TV.
"Having Timmy back was important too and gave us more of a spring in our step."
Midfielder Matt McKay doubled the lead with his first international goal four minutes later when his shot hit the Lebanon goalkeeper and looped into the net.
Substitute Archie Thompson rounded out the victory with his left foot after a defensive mistake two minutes from time to give Holger Osieck's men the best possible preparation for their match against Jordan.
"Particularly in the first 45 minutes there were some really good elements that were very encouraging, individually and as a team," German Osieck said.
"We had some good aspects and that gives me some confidence for our game on Tuesday."
Schwarzer, who had little to do in his hundredth match for his country, said securing a third successive appearance at the World Cup finals for him and his country by finishing in the top two of their group was more important than such milestones.
"For me, what would be best is qualifying for a World Cup," the 39-year-old said. "A hundred caps is nice but I want to qualify for the World Cup."