We describe a sampling method to estimate the polarized CMB signal from observed maps of the sky. We use a Metropolis-within-Gibbs algorithm to estimate the polarized CMB map, containing Q and U Stokes parameters at each pixel, and its covariance matrix. These can be used as inputs for cosmological analyses. The polarized sky signal is parameterized as the sum of three components: CMB, synchrotron emission, and thermal dust emission. The polarized Galactic components are modeled with spatially varying power law spectral indices for the synchrotron, and a fixed power law for the dust, and their component maps are estimated as by-products. We apply the method to simulated low resolution maps with pixels of side 7.2 degrees, using diagonal and full noise realizations drawn from the WMAP noise matrices. The CMB maps are recovered with goodness of fit consistent with errors. Computing the likelihood of the E-mode power in the maps as a function of optical depth to reionization, tau, for fixed temperature anisotropy power, we recover tau=0.091+-0.019 for a simulation with input tau=0.1, and mean tau=0.098 averaged over 10 simulations. A `null simulation with no polarized CMB signal has maximum likelihood consistent with tau=0. The method is applied to the five-year WMAP data, using the K, Ka, Q and V channels. We find tau=0.090+-0.019, compared to tau=0.086+-0.016 from the template-cleaned maps used in the primary WMAP analysis. The synchrotron spectral index, beta, averaged over high signal-to-noise pixels with standard deviation sigma(beta)<0.25, but excluding ~6% of the sky masked in the Galactic plane, is -3.03+-0.04. This estimate does not vary significantly with Galactic latitude, although includes an informative prior.