Quick Answer. The Battle of Gettysburg occurred as a result of General Robert E. Lee's push north into Pennsylvania in an attempt to move the bulk of the fighting in the east away from Virginia and into Union territory. His ultimate goal was Philadelphia, but General George Meade's forces caught up with him at Gettysburg.