There's an entire literature of alternate history on Gettysburg - more than the rest of the war put together, most likely. I have always found this a bit ironic, as it seems to me that a smashing Confederate victory might not have made much difference in the ultimate outcome of the war. A crushing Confederate victory could only be achieved with crippling losses being inflicted upon the Army of Northern Virginia as well and Lee would have to retreat into Virginia sooner or later anyway. Moreover, we can see from letters and diaries that many people at the time saw Gettysburg more as a standoff than a Confederate defeat.
Confederate victory in 1863 is impossible, because no matter what happens, Lincoln is going to stay in office and he will continue the war to the bitter end. Confederate victory in 1864 is possible, because the election gave the Confederates the chance, through battlefield success, to cause Lincoln's defeat at the polls and ensure a pro-peace administration comes into the White House. That's why I consider the Overland Campaign, the Atlanta Campaign, and the 1864 Shenandoah Valley Campaign far more important to the ultimate outcome of the war than the Gettysburg Campaign.