The state-run Ceylon Electricity Board said supply was gradually being restored across the island after lightning tripped the main supply at a key distribution point.
"We have initiated an investigation," Energy Minister Ranjith Siyambalapitiya told reporters.
"It is suspected that a lightning strike on the transmission line was the issue."
The island's usually heavy traffic descended into chaos as motorists were held up on main roads for hours after traffic signals failed and police were left overwhelmed.
Power blackouts occur sporadically in Sri Lanka, with today's outage the first time in five months that the country was plunged into darkness.
The sudden outage came on the second day of Key's two-day visit, which got off to a shaky start Wednesday after Sri Lanka gave him a baby elephant as a gift, sparking anger from animal rights activists.