At Gettysburg, he did not know what he faced. The calvary was not available to him to report where the Union Army was and which portions he faced. There were also two new corps under new corps commanders.
Ignorance of the situation on the first day of Gettysburg is one thing but not listening to his commanders (Longstreet in particular) on subsequent days was just plain stubborn arrogance. He had come to believe his own press and for a leader that can be fatal. A gifted general, yes but that is in comparison with the union political yahoos who were put up against him. When he encountered “that drunk” Grant as his adversary he found he was up against someone who had his own failings, did not worry so much about what others thought of his decisions and who did not believe Lee to be infallible. Lee’s really notable actions were in his efforts to bring about reconciliation after the war. He was a model of leadership in that respect.