A stunning late resurgence and two superb drag flicks from Sandeep Singh ensured that India beat Pakistan 3-2 in a heart-stopping Champions Trophy tie.