Warsash is not on the rail network. The nearest stations are Swanwick (15 minutes' walk via the Strawberry Trail and a couple of footbridges) and Hamble across the river (which requires the pink ferry). Both are on the slow Southampton–Portsmouth line.
By road from Southampton: M27 to junction 9, then south through Park Gate. From Portsmouth: A27 to Titchfield, then south through Locks Heath. Bus 5 from Southampton city centre runs to Warsash via Bursledon every 30 minutes most of the day.