We study the recovery of sparse signals from underdetermined linear measurements when a potentially erroneous support estimate is available. Our results are twofold. First, we derive necessary and sufficient conditions for signal recovery from compressively sampled measurements using weighted $\ell_1$-norm minimization. These conditions, which depend on the choice of weights as well as the size and accuracy of the support estimate, are on the null space of the measurement matrix. They can guarantee recovery even when standard $\ell_1$ minimization fails. Second, we derive bounds on the number of Gaussian measurements for these conditions to be satisfied, i.e., for weighted $\ell_1$ minimization to successfully recover all sparse signals whose support has been estimated sufficiently accurately. Our bounds show that weighted $\ell_1$ minimization requires significantly fewer measurements than standard $\ell_1$ minimization when the support estimate is relatively accurate.