Bradshaw says ‘Opposite [St John’s Church] are the vast premises forming the London Terminus of the South West Railway.’ The original thinking was to create a rail link between Southampton and London for trade, and the first station opened at Nine Elms in London in 1838. However, rail travel rapidly became very popular and so the company (the London and South Western Railway) decided to extend the line close to the end of the new Waterloo Bridge, built 1811-17. The line opened in 1848 and because it crossed marshy ground it was raised on arches, a viaduct. The station faced York Road.
By the end of the 1900s the station was both delapidated and confusing and it was decided to rebuild. However, WWI intervened and the new station was only opened in 1922 by Queen Mary (full coverage here). Only the roof over platforms 18-21 and supporting walls and columns remain from the first station, although the line of the viaduct is still clear.
Underneath the station there are apparently large vaults (photographs here).
The London Necropolis Railway opened in 1854, running between Waterloo Station and Brookwood Cemetery. London cemeteries were overcrowded and the authorities used the new railways to take burials out of the town, to a newly built cemetery in Surrey. The trains ran on the existing London and South West Railway tracks but there was a special station at Waterloo, with private waiting rooms for the mourners. 121 Westminster Bridge Road for the London Necropolis Railway. Waterloo Station needed to expand and so in 1902 the terminus was moved to Westminster Bridge.