Data assimilation in subsurface flow systems is challenging due to the large number of flow simulations often required, and by the need to preserve geological realism in the calibrated (posterior) models. In this work we present a deep-learning-based surrogate model for two-phase flow in 3D subsurface formations. This surrogate model, a 3D recurrent residual U-Net (referred to as recurrent R-U-Net), consists of 3D convolutional and recurrent (convLSTM) neural networks, designed to capture the spatial-temporal information associated with dynamic subsurface flow systems. A CNN-PCA procedure (convolutional neural network post-processing of principal component analysis) for parameterizing complex 3D geomodels is also described. This approach represents a simplified version of a recently developed supervised-learning-based CNN-PCA framework. The recurrent R-U-Net is trained on the simulated dynamic 3D saturation and pressure fields for a set of random `channelized geomodels (generated using 3D CNN-PCA). Detailed flow predictions demonstrate that the recurrent R-U-Net surrogate model provides accurate results for dynamic states and well responses for new geological realizations, along with accurate flow statistics for an ensemble of new geomodels. The 3D recurrent R-U-Net and CNN-PCA procedures are then used in combination for a challenging data assimilation problem involving a channelized system. Two different algorithms, namely rejection sampling and an ensemble-based method, are successfully applied. The overall methodology described in this paper may enable the assessment and refinement of data assimilation procedures for a range of realistic and challenging subsurface flow problems.