  In this paper, we consider normalized newforms $f\in
S_k(\Gamma_0(N),\varepsilon_f)$ whose non-constant term Fourier coefficients
are congruent to those of an Eisenstein series modulo some prime ideal above a
rational prime $p$. In this situation, we establish a congruence between the
anticyclotomic $p$-adic $L$-function of Bertolini-Darmon-Prasanna and the Katz
two-variable $p$-adic $L$-function. From this, we derive congruences between
images under the $p$-adic Abel-Jacobi map of certain generalized Heegner cycles
attached to $f$ and special values of the Katz $p$-adic $L$-function.
  In particular, our results apply to newforms associated with elliptic curves
$E/\mathbb{Q}$ whose mod $p$ Galois representations $E[p]$ are reducible at a
good prime $p$. As a consequence, we show the following: if $K$ is an imaginary
quadratic field satisfying the Heegner hypothesis with respect to $E$ and in
which $p$ splits, and if the bad primes of $E$ satisfy certain congruence
conditions mod $p$ and $p$ does not divide certain Bernoulli numbers, then the
Heegner point $P_{E}(K)$ is non-torsion, in particular implying that
$\text{rank}_{\mathbb{Z}}E(K) = 1$. From this, we show that when $E$ is
semistable with reducible mod $3$ Galois representation, then a positive
proportion of real quadratic twists of $E$ have rank 1 and a positive
proportion of imaginary quadratic twists of $E$ have rank 0.
