President Biden is struggling to overcome doubts about his leadership inside his own party and broad dissatisfaction over the nation’s direction, leaving him trailing behind Donald J.