Like many lines of historical speculation it has aspects of being both right and wrong.
Ultimately the Confederacy had no realistic chance of winning a serious, drawn out war. They lacked the resources, they lacked the industry, they lacked even the man power. The Union had a more than 2:1 population advantage against the Confederacy (and that includes slaves), and something like a 30:1 advantage in firearms, clothing, and iron production. Couple that with a massive naval superiority, overall manufacturing capability, and huge transportation advantages (railroads) and the fight becomes extremely lopsided.
But at the same time, look at the Vietnam War. Could the Viet Cong win a traditional war in Southeast Asia against the US and its allies? Absolutely not, even with outside help it just didn't have the resources. But it didn't fight that sort of war, so today South Vietnam doesn't exist. Had the Confederacy succeeded in early strikes against key targets it might have been able to win the war politically, gain foreign allies, turn the Union electorate against the war, and be able to sue for peace successfully and retain their independence. That, I think, is a realistic scenario.
Well, there's a difference between realistic and probable; the odds were heavily stacked against the Confederacy from the beginning. In terms of free white population, the North was three (almost four) times more populous than the South, and the millions of slaves were a double edged sword. Many Confederate soldiers never left their state, or never became soldiers, because they were needed on the home front to keep slaves under control. The North had major strategic advantages; New York state alone turned out a greater volume of industrial production than all the states of the Confederacy put together. They had long established relations with the major European powers, a pre existing army and navy, extensive coastal fortifications that could support blockading vessels, extensive rail networks, and a quite diverse economy compared to the South's focus on cotton.
It's easy to look at the 'Excel spreadsheet' of the war, and conclude that the North's victory is inevitable. But war is not an Excel spreadsheet. War demands and rewards courage, tenacity, will, and the crafting of a superior strategy. Combatants with inferior resources can overcome material disadvantages by using their resources more efficiently, demanding greater sacrifices from their civilian populations, and by effectively leveraging their strengths against their enemy's Center of Gravity (basically That Thing They Need To Keep Fighting).
The South began the war with advantages of its own. They had control of the Mississippi river in its lower reaches, making it much harder for midwestern grain to reach national and international markets. In Virginia, the terrain favored the defender, who had between six and nine rivers to cross before reaching the enemy capital. Because of the proliferation of military academies across the South (VMI and the Citadel being the most famous), there is a larger proportion of the population experienced with military life, who can be made officers. Since they were contending for their independence, they had the simpler task of defending, rather than assaulting territory. Furthermore, this defensive posture let them use knowledge of local terrain to great advantage, as demonstrated in Jackson's Valley Campaign.
Broadly speaking, their morale was sky high through the first few years of war, and committed their young nation absolutely to the war; out of the South's free population, about one in five served in the war.
While the North had diplomatic advantages stemming from continuity of a recognized government, the South had close economic ties with major powers. The main industrial product of Great Britain was textiles, and seventy five percent of their cotton came from the U.S. South.
On paper, at least, they seemed to have a much better high command to lead them to independence; Jefferson Davis was an experienced politician, and a very successful Secretary of War before secession, whereas Lincoln had absolutely no executive or administrative experience relevant for a Commander in Chief. When the Quartermaster General of the US Army died in 1860, three of the four officers suggested to replace him later fought for the Confederacy as full Generals. If, in 1860, you got to put together a dream team high command to fight a war, your picks would probably be largely Southerners, with some prominent exceptions like McClellan (hindsight sure is 20/20).
They also have disadvantages, though, that hindered the effective conservation of resources and leveraging of their strengths against the North's Center of Gravity. While the South's perception of honor, which included concepts of valor, kinship, masculinity, independence, luxury, leisure, and generosity, promoted some qualities that enhanced soldiers' fighting spirit, it also promoted resistance to military discipline, squandering of precious resources, and disdain for the less glamorous aspects of military life, such as staffwork and fortification. PGT Beauregard and Joseph E Johnston, tasked with overcoming the mens' cultural background to teach them the mentality of a soldier, failed to rigorously discipline their men or observe proper staffwork procedure. Lee was aghast at these deficiencies when he took command of the Army of Northern Virginia in 1862, and did what he could to try to remedy the problems, though constant attrition in the officer corps was a major obstacle, and he was never really satisfied. As an engineer, Lee appreciated the benefits of field fortifications; men protested than digging trenches and felling trees was work for slaves, and thus unworthy of a self respecting white man, but Lee didn't care. Lee advocated for a rudimentary form of total war; if it required all the meat in the country to feed the army, it should be had, he argued. He wanted to prohibit all use of railroads except on government business, to prevent them from wearing out. He even wanted to depopulate the city of Richmond itself to simplify his supply situation.
Another major problem faced by the Confederacy was that their most likely ally, Great Britain, was the historical center of anti-slavery sentiment, and had great apprehension against deciding a conflict on the side of a slave driven power. The Confederates exacerbated this problem by provoking British resentment by destroying cotton stocks, so they would feel the loss even prior to Lincoln raising the blockade. Thus, they missed out on a quick infusion of cash that would have helped down the road, and irritated a potential ally.
There were two main possible points of failure in the Union war effort; mediation or intervention by a Great Power, or electoral defeat of the pro-war party in 1864. Neither was outside the realm of possibility. The Emancipation Proclamation, with its acknowledgement of the centrality of slavery to the Confederate war, made mediation by Great Britain very unlikely. However, it was contingent on a very volatile chain of events. Lincoln agreed with his cabinet that he would only have the political capital to issue Emancipation after a battlefield victory, which was the battle of Antietam. McClellan's success in that battle would have been much less likely if a Union soldier had not had the incredible luck to find a complete copy of Robert E Lee's campaign plan for the invasion of Maryland. Without it, Lee would have captured the garrison at Harpers Ferry (more than ten thousand men, at negligible loss), and McClellan would have fooled himself into thinking he was facing four times as many Confederates as he really was, and would have retreated, yielding a battlefield on Union soil to the Southern enemy. The Emancipation Proclamation, which hinged on this battle, was vital to the Union war effort; in addition to keeping Britain out, it allowed the President to raise forces of black troops, who were vital to the Union war effort in the last two years of the war. More than 180,000 volunteered in the last two years, when white volunteers were being diluted by less reliable conscripts.
The military and the government mutually supported each other. The military needed the government's support and direction, but the government needed military success if it was going to survive the voting booth. There was a vocal faction calling for peace with the Confederacy in the North, called Copperheads. The Confederates were very much aware of their allies in the North, and put their lives on the line to help them at polling places. Lee's invasion of the North in 1862 was during a congressional election year, and he hoped his 1863 invasion would help Copperhead candidates for governor in the key states of Ohio and Pennsylvania. Because the Union army beat back these offensives, the Republicans succeeded in voting booths and kept up the war effort. This was not a foregone conclusion. Much in these campaigns, like all military contests, comes down to chance, reflex, and volatile, unpredictable shifts in morale. The greatest test of political will came in 1864, when Lee had repeatedly intercepted Grant's flank attacks, with heavy losses bolstering peace sentiment in the North. The Republican party was initially divided between Lincoln and his old rival Fremont, and many believed his Democratic rival, McClellan, would sweep the military vote. However, Grant's strategy finally succeeded in delivering the Union Atlanta, a battlefield victory which bolstered Lincoln's standing when he needed it most, and he went on to win 90+% of the electoral college.
However, it's hard to overstate just how narrow this electoral victory was. I crunched some numbers, and if McClellan had won 1.5% (about 55,000 votes out of 4,000,000+) more votes in key states, he would have eeked out an electoral victory with just 46.5% of the popular vote, on a Party Platform that called for peace with the Confederacy. His campaign had already been stymied by inconsistencies between him and the party (he professed to be a War Democrat, despite the party platform, which likely cost him votes and made his campaign seem muddled and contradictory), so it's certainly not impossible to imagine a Democrat victory in November 1864, especially absent the crushing victory at Atlanta. There would still be four months before he took office, but winter is a slow campaigning season, and the conditions that make a Democrat victory in 1864 possible also would leave a Confederacy with more space to trade for time. Many, many things could have gone wrong for the Union in the run up to 1864, but after a lot of trial and error (and luck!), Lincoln had finally gotten the right people in the right places to win the war.
/u/WalterskinnerFBI has a pretty good answer here. I'll add just a few things to that, starting with recommending James McPherson, Battlecry of Freedom.
The South did have a chance to win the Civil War, despite the North's industrial and manpower advantages. Lincoln was never a truly popular president until the autumn of 1864 - a late surge brought on by Union victories right before the election that year. Prior to that that, Lincoln had to contend with opposition to the war itself from the remaining Democrats in Congress and significant opposition within his own party. The collapse or defeat of the Lincoln government would have at the very least bought the South some time, if not an armistice or independence.
Also, the Confederacy was terrible to its own people. Black support for the Union was as obvious as it was useful, but an increasing number of Southern whites opposed the rebellion as the war dragged on. The Confederate draft burned up goodwill by extending the enlistments of every soldier in the rebel military and forcing poor whites to fight in a slaveholder's war while giving a draft exemption to anyone who owned more than twenty slaves. Conscripting men and recalling deserters sparked a bloody guerrilla war between rebel home guardsmen and draft resisters. Things got so bad in some cases that even people who supported welcomed the arrival of the Union army just to preserve the rule of law.
Had the South been less brutal towards its citizens, more of the 100,000 white men from below the Mason-Dixon Line who fought in Union regiments might have served the rebellion instead.
I really do think the south had a decent chance. For one thing they did very well on the major battlefields in the first half of the war. If Lee had continued his success in the eastern theatre or if they could have had similar success in the west, say thoughout the year 1863, then it is hard say that union could have had enuf success in 1864 to win the elections for more moderate political factions.
The south also committed huge blunders in the early part of the war, so it was not complete military success either. But these blunders do make the case that the south could have done a lot better early on. For one thing, New Orleans the largest city in the south fell almost without a shot being fired. They just plain retreated and made no effort to contest. The north also scored easy victories in east Tennessee and western Virginia at a time when they were doing very poorly nearly everywhere.
Also the south made major economic mistakes. For one thing they decided to try to keep all their cotton in port and hope that this would pursuade europeans to join them but the blockade got stronger and most of the cotton did not get sold. Also they had about $6 million dollar in gold in New Orleans bank that was simply taken by the north when it should have been moved out. Also the confederates sold bonds, which are like loans, based on the being able to redeem cotton. However the european bankers talked Judah Benjamin into puchasing back some of their own bonds in order to prop up the price. That backfired cause of the embargo, and the bonds went down in value and the south was out that much more money.
They also had some screwed up internal practices, they failed to get taxes paid in currency (as I recall) which messed up the value of their moneuy. They did nationalize their rail roads, or even try to nationalize their reserves of cotton. IT was basically still up to private individuals to control this stuff.
Maybe even worse they made not attempt to free slaves by putting them into the armed forces. Which would have been radical solution but also a pretty serious response. it could have diffused the slavery issue for one thing. YOu can read Mary Chesnut's diary and shes always talking about the old Roman empire and stuff and she doesnt seem to notice that the Romans ARMED THEIR SLAVES rather than surrender to Carthage. Most southerners couldnt face this solution.
They made a number of very bad battelfield decisions some of the major ones: they sort of blundered and allowed an entire army to be trapped in vicksburg which was a waste. Any army that Joe Johnston got near he messed up by retreating: he would have lost Richmond in '62 had he not been wounded, he did very little to help Vicksburg in '63 and didnt do much to stop Sherman in '64. Braxton Bragg was a pretty good administrative general and logistics guy but was very bad battlefield commander. He remained in various positions throughout the war; most notably failing at the siege of Chattanooga in 1863 after sending his best troops under Longstreet for a futile siege. Leonidas Polk was another totally useless political general. These were some very bad choices and obvious at the time.
Finally i will give you some other "what if" choices that would have been bold but might have made a difference. There's no real way to tell. 1) sending Lee out to the western theatre. Lee basically did not want to do that I guess he felt compelled to fight with his men in the east. But a broader outlook would have seen that the western theater was one disaster after another and the eastern theater was narrow enuf that it might have been held on the defensive at least for 6 months. So you have to leave Longstreet (questionable) or Beuregard (decent, interesting choice) or Jeb Stuart or someone in charge of the east and send Lee out west in a desperate move to redeem the situation.
So basically, this war was a very close run affair, obviously it was cause of the high number of casualties. That alone suggests this war could have gone either way. Mismatched armies dont produce blood results.
There are many "ifs" to suggest that the South could have won. "If" they'd won at Gettysburg, for example, but they didn't, and even if they had won, that didn't guarantee victory. Shelby Foote argues that the North won effectively by only using one hand, if the South had ever looked as if they might really have won, then the North would have simply used the other hand as well. Another view is that the people of the South weren't sufficiently prepared to fight for the cause. Many saw it as the cause of the wealthy slave owners rather than their cause, consequently resistance to conscription was very high, as was desertion, in many cases wastage through desertion was far higher than battle casualties. There was also very little resistance to Northern occupation, apart from a few instances in the West, such as the guerilla campaigns in Missouri and Kansas. There was very little attempt to disrupt Northern supply lines, for example, beyond cavalry raids, which rather suggests that the bulk of the population were never that committed to the cause. This meant that the South was never going to win.