There were larger battles in the Civil War which lasted for longer periods of time than 3 days (Chancellorsville comes to mind). What made Gettysburg unique enough to be the bloodiest battle of the war?
Multiple reasons. The determination of the soldiers and their commanders was one - for the Confederates, it was believed that victory in Pennsylvania might end the war, and for the Federals, the determination to not be beaten in loyal territory may have made them less willing to give ground. In the fighting of the battle itself, commanders on both sides put their troops in a position to be mauled (Heth and Barlow on the first day, Sickles on the second day), and hard, extended fighting over single positions (Oak/Seminary Ridge on the first day, the Wheatfield on the second day) resulted in heavy casualties on both sides.
Additionally, while Lee had been successful attacking the Federal army in the past, Gettysburg found the Army of the Potomac in perhaps the strongest defensive position Lee had attacked them in yet. Meade's right on the second and third day rested on Cemetery and Culp's Hill, his left on the Round Tops. While usually Lee would have maneuvered around the position to attack Meade on ground more favorable to Lee (something Meade considered likely), he did not do this at Gettysburg for multiple reasons. First, his tremendous success on the first day apparently convinced Lee that the battle could be won here - he did not see that the failure to drive the Federals off of Cemetery Hill on July 1st had changed the trajectory of the battle. Second, he was without cavalry until the afternoon of July 2nd. He was not fully aware of what was in front of him, and what would await him beyond Gettysburg if he tired to maneuver. Third, the road network available to him was not favorable to a large scale maneuver. While he could move around Meade's right with with road networks north and east of town, doing so would both extend his line of communication with Richmond and expose it to being cut. There were no easy roads around the left flank. The only roads that could be marched without exposing the move to Meade were so far away from the battlefield and Meade would have plenty of time to react to the move and reposition himself, negating the value of the flank march. Had Lee tried to make a large move around the left, Meade would have likely withdrawn to the Pipe Creek line, which was considered to be a far stronger defensive position for Meade. A tactical maneuver was possible, and Longstreet explored the idea on the morning of the third day, but it was both rejected by Lee and probably would not have been a good idea anyway, with our knowledge of Meade's ability to quickly respond to that maneuver with troops behind the Round Tops.
So Lee had to attack Meade in the position where he was. And while the highly motivated Confederates fought well, they were at best able to make partial gains, driving Sickles and the men sent to reinforce him out of their exposed positions on the Emmitsburg Road, Wheatfield and Devil's Den, but capturing none of the actual important positions.
Having clearly won the first day and had seeming success on the second day, Lee was not about to retreat on the third day. Having struck that possibility, the only real option was to attack Meade where he was again (Lee did not have enough ammunition to maneuver and start an entirely new battle, while Meade was only 30 miles from his base of supplies). With continuing the attacks from where they left off being ruled out by Longstreet (leaving the Devil's Den would expose the Confederate rear to troops on the Round Tops), Lee took one of Longstreet's divisions and two of Hill's (two divisions which had been mauled on the first day) and ordered an attack towards the Federal center. The result was the famous "Pickett's Charge", which resulted in 50% casualties and, finally, a clear victory for the Army of the Potomac.
So while other battles were longer or involved more men, the circumstances of Gettysburg - the morale of the fighting men, the willingness of the armies to hold and attack a position despite heavy loss, numerous mistakes by subordinate commanders leading to heavy losses in their units, and the limited options for maneuver available to Lee after the first day, combined to make it a uniquely bloody battle.
Edited for typos