In addition to Paperpusher's questions; what country was the ship registered to? When did this happen? Do you have the name of the ship therefore able to check the ships records? Do you have your Grandfather's birth certificate?
Below is an extract regarding births at sea from a family history research website I use - it links to quite a few National Archive records. If the birth was not registered in this manner and your Great Grandparents waited to register the birth in South Africa, dependant on when this happen, it was not compulsory to register British births abroad so you may have difficulties finding a note of the birth. As South Africa is part of the Commonwealth if your Grandfather was born post British independence (1961) and was registered as an "overseas" British birth then there would be a record of this. But unless you are very young I doubt that the latter would apply.
The Registry of Shipping and Seamen records list the birth and death returns from 1837 to 1965. Marine records came into existence under the provisions of the 1836 Act and were continued to be made under subsequent legislation.
Currently the registrations are made under the Merchant Shipping Act and subsequent regulations which state that if a child is born in a ship or a person dies in a ship, registered in the UK, the master of the ship will make a return to the Registrar General of Shipping and Seamen who will register the event.
The Registrar General of Shipping and Seamen will then send a certified copy of the registration to the appropriate Registrar General.
Whilst the majority of these records will be about merchant seamen, many of the records also include details about passengers.