An agreement between the GWR and the Metropolitan Railway (who had co-owned the Hammersmith & City with the GWR since 1867) came into force on 1 July 1868, although it did not become legal until the following year. Under the agreement, various improvements were to be made; these included the provision of a station at Royal Oak, and the reconstruction of Westbourne Park. On 30 October 1871 the station at Royal Oak opened,Template:Convert/chain out; it was situated between Ranelagh Bridge and Lord Hills Bridge, and access was from the latter. As originally built, it had three platform faces; one for down trains and two, each side of an island, for up trains. It was served by both main line and Hammersmith & City trains, and, for over sixty years, this was the first stop out of Paddington for main line trains; it remains the first stop for Hammersmith & City services.
During the quadrupling of the Great Western Main Line (GWML) in 1878, a dive-under, known as Subway Tunnel, was constructed between Royal Oak and Westbourne Park. This was for Hammersmith & City services, allowing them to cross the main line without interfering with the flow of traffic; it was brought into use on 12 May 1878. To accommodate the additional track of the main line, it was necessary to reduce Royal Oak station to two platform faces; the former down platform was removed (its track becoming the up main), and the southern of the two former up platforms became the down platform.
Trains along the GWML ceased to call at Royal Oak from 1 October 1934, but the Hammersmith & City service remained. Ownership of the station was not transferred to London Transport until 1 January 1970. The first GWML stop out of Paddington is now Acton Main Line.
There had been a locomotive depot at Westbourne Park since 1855, which was replaced by the Old Oak Common depot in 1906. To avoid the need for locomotives to make the Template:Convert/mi round trip from Paddington just to be turned, coaled and watered, a small maintenance facility for locomotives was constructed on the southern side of the line, directly opposite Royal Oak station, which occupied part of the site of Westbourne Lodge and its grounds. It was known as Ranelagh Bridge depot, and opened in 1907. There was a turntable, a water tower, a coaling stage and sidings where about 15 locomotives could be held awaiting their next trip west. The turntable was removed in April 1964, and the depot facilities were altered to suit Diesel locomotives; the depot closed in 1980.
Currently under construction to the North of the Hammersmith and City Line, immediately West of Royal Oak Underground Station, Royal Oak Portal is the Western tunnel entrance for the Crossrail scheme to link East and West London by main-line railway. The station itself is not part of the Crossrail scheme.