I thought the longest production lens was the Canon 1200mm f/5.6 but I learned today that Nikon once made a 1200-1700mm zoom! Surprisingly it matched the f/5.6 at the 'short' end, and even at the long end it only dropped to f/8. Manual focus unfortunately. I found out about it from an advert by a guy who's selling one and he didn't want the link passed around, but here's a page with some more info:

Nikkor 1200-1700mm f/5.6~8.0

The guy who wrote that page comments about it being the most expensive lens for 35mm SLRs, but if I'm not mistaken the Canon prime retailed at $80,000 while the Nikon zoom retailed at $75,000. The second-hand zoom is going for $40,000 and amazingly the seller also owns the Canon prime!

Of course both lenses pale in comparison to the Carl Zeiss 1700mm f/4 which was recently built to order, reportedly for a specialist wildlife photographer in Qatar, with the price tag rumoured to be somewhere around a million dollars.

Carl Zeiss info page

Additional info and photos