Thanks to everyone for your input. I have summarised my findings follows:
Due to Newton's first law, no object can gain speed unless energy is put into it. The hole gives no energy to the golf ball - it is a passive object, sitting still doing nothing. Therefore, a golf ball would not normally gain speed when it "lips out" (see exemptions below).
The best explanation of why the ball "appears" to accelerate is because of the perspective that you are looking at the ball. If you are the player, after you strike the ball, it is moving directly away from you and so appears not to be moving very fast at all (same as a star moving away from us at light years of speed but appears not to be moving - this is called "angular speed" and in this case is zero. Note that "angular speed" is not the same as "actual speed". Angular speed is about how fast something moves across your vision). When the balls comes off the hole at 90 degrees, it suddenly has a lot of angular speed (from the ball striker's perspective) but no more actual speed. The human eyes and brain confuse angular speed with actual speed.
However, there are few other interesting points.
There are two ways that a ball could actually gain speed:
1. If the hole was angled on a slope, and the ball left the side of the hole that was lower to the the side it entered. Gravity would then have acted on the ball as a force, and due to Newton's first Law, would have gained speed. However, the angle of a golf hole is normally so shallow, that this effect would have no noticeable difference on the speed of the ball. So it is highly unlikely that this effect would happen more the once every million shots.
2. If the ball had a lot of sideways spin (this is called rotational energy), and it hit the cup in the right direction, it could convert the rotational energy into kinetic energy (i.e. gain speed). A bit like in tennis, a heavy topspin shot kicks off the court - exactly this effect. However, a golf ball is very unlikely to have any sideways spin off the face of a putter, and having rolled along the grass which would have stopped all sideways spin by the time it hits the hole. So, again, it is highly unlikely that this effect would happen more the once every million shots.
About spaceships using planets to sling shot, this is different to the golf ball scenario. Spaceships do use the slingshot effect to gain speed, but the reason this is possible is because the planets are moving at massive speeds through the solar system relative to each other. When the rocket accelerates, it actually slows the planets orbit (very very fractionally). So the planet is more like a man's arm throwing a hammer in athletics - it puts energy into the hammer, thus accelerating it. If the planets in the solar system were completely static, there would be no sling-shotting of rockets around the solar system.