Would if be possible for them to win the war?
I'm going to focus only on this question - supposing a Confederate victory at Gettysburg, does the South win the Civil War?
Let's assume that Lee is victorious and forces the Army of the Potomac to retreat in some disarray to the south. Meade will certainly regroup along the Pipe Creek Line and protect the approaches to Washington City. In no realistic scenario is the Union army going to be destroyed or Washington City captured. That was simply not in the cards.
Lee would have had a short window of time to send out raiding parties through Pennsylvania, perhaps occupy Harrisburg briefly (if he can get across the Susquehanna River), and gather whatever supplies he can. Eventually, of course, he is going to have to get back to Virginia. The Union army will recover within a short amount of time and advance against Lee's supply line. It's also possible that a Union movement against Richmond might force Davis to recall Lee to defend the capital. I don't see Lee's men remaining in Pennsylvania beyond mid-September in any scenario.
But Lee's "invasion" of Pennsylvania was so obviously a raid, and not intending to conquer territory, that his withdrawal back to Virginia would not really be seen as a retreat. To the Northern public, the whole thing would look like a total disaster - yet another defeat at the hands of the invincible Lee, and on Northern soil, no less. The blow to popular support for the war would have been disastrous for the Lincoln administration and would spell serious trouble in terms of the upcoming 1864 election, on which everything depended.
Militarily, Lee and his army would settle back into Northern Virginia having the satisfaction of beating the Yankees yet again and probably much better supplied than they were historically. The Union army would have been in worse shape than it was historically, meaning there is little likelihood of any kind of summer offensive. We know from letters and diaries that the men of the Army of Northern Virginia were still confident when Grant launched his campaign in the spring of 1864; imagine how much better morale would have been after a successful Pennsylvania campaign. And they would have lost far fewer men, in any event.
Even with the historical Union victory at Gettysburg, we see the massive draft riots erupt in New York City that same month. If the Army of the Potomac was actually defeated, such civil disturbances might have been ever worse and taken place in more cities, as it would have added to the popular perception that the war was unwinnable and that draftees were simply going to be sent south to needless deaths.
We also have to consider the possibility that Union troops from other theaters would have to be sent to the East to reinforce the AotP (rather in the same manner that troops from the East were sent to the West after Chickamauga). This would raise questions about whether Chattanooga would still fall and possibly sets back the whole Atlanta Campaign.
All things considered, while a major Confederate victory at Gettysburg does not win the war by itself, it certainly places the Confederacy in a much better position to win the war in 1864.