On the first day of fighting, the Union forces were pushed through the town of Gettysburg by the Confederates. This allowed the Union troops to concentrate on the higher ground surrounding Gettysburg. So the advantage was sucurring the higher ground.