Battle of Gettysburg, major engagement in the American Civil War that was fought southwest of Harrisburg, Pennsylvania, and was a crushing Southern defeat. The three-day conflict involved more than 71,000 Confederate troops commanded by General Robert E.