I deal with this issue on an almost daily basis - it's one of the biggest design challenges in electronics next to thermals.
We make our own enclosures in-house, so I have the luxury of being able to create whatever housing I want. But in no particular order, what helps me is...
1) Conformal coatings
2) Epoxy potting
3) Waterproof connectors (expensive and only as waterproof as how well they are used - if a customer doesn't plug it in correctly or compromises the water seal, you will still get it back under warranty with a 'I have no idea what happened - it just stopped working' explanation).
4) One trick I really like is to just put a threaded hole in the outside of a housing where a test point is. Then use an off-the-shelf screw with a rubber washer or o-ring. When the screw is installed, it will be water tight, but you can easily take it out to get to the test point below. Just be sure the screw doesn't go too deep and hit the board.
5) Using alternative methods for interfacing.. rather than a wire, you can use a magnet to actuate a hall effect sensor, or you can use an IR receiver which will function through clear epoxy, or you can use radio communication, etc. This can help eliminate some need for external connectors and wires.
6) Having wires come off the board and pot the whole thing. It's much easier to seal wires with heat shrink or just by dipping in "liquid electrical tape". This is very cheap and works for things you would only need to access rarely, like a programming interface for programming in the field. Dangling wires is not very good for consumer products, though.
7) I also sometimes bring wires out of a potted unit and terminate with a waterproof connector - then I take the mating part of the waterproof connector and just fill it with hot glue to make a "cap" for the waterproof connector to terminate it and keep it waterproof. Then when you need to access the port, unplug the dummy plug and insert the real mating part in.
You can also use dielectric grease, but it's a pretty shoddy way to create waterproof products... it works if the consumer will never be accessing the unit, though.