There was cavalry at Gettysburg. If I remember correctly, it was the 17th Virginia Cavalry Regiment and the 35 Battalion. I read it in a book titled:
Gettysburg - Culp's and Cemetery Hill by Harry W. Pfanz.
And the Confederates were the attackers. http://www.civilwar.org/battlefields/gettysburg/maps/battle-of-gettysburg.html
Furthermore, it was the Confederates that attacked the Union Center. Have you ever heard of Pickett's Charge?Http://www.Civilwar.Org/battlefields/gettysburg/maps/battle-of-gettysburg.Html
It's stated time and time against, this misconception that Lee's plan in the second day was the flanks. From the beginning, Lee's target was Cemetery Ridge, the center of the Union line. The attacks on the flanks were another use of what he did so effectively at Chancellorsville, which was to roll up the flanks. Therefore, Lee would never have evn considered attacking the enemy flanks, 1. Because it was not his plan, 2. Because by that point the flanks were already heavily reinforced from the second day, and it was likely more reinforcements would be coming, as not the entirety of the Union army was deployed at Gettysburg. Also, it made the most sense ( if he had to attack ) to go for the middle, where the Union line was weakest, and where he received three brigades of fresh troops. His best option, however, was probably retreat at that point, seeing as the Union had the best ground for miles, and they had already failed once to take the best Union ground.
Lee, the confederate commander, had three major setbacks in this battle:
Ewell failing to seize Cemetery Hill
Stuart depriving the army of cavalry (arguably at it's most crucial moment)
Longstreet for failing to attack as early and as forcefully as Lee had originally intended.
With all these failings, the Union forces were able to repel attacks from their front, left, and right repeatedly and effectively.
Had the Union lost Cemetery Hill, the strong defensive position would have been a toehold for the Confederacy, turning the battle in their favor.
Had the cavalry shown up, they may have well be outmaneuvered and forced to leave a flank exposed.
Had Longstreet pressed with proper tenacity, the Union would have been forced to send units to reinforce against his attack, leaving vulnerabilities across the rest of their line.
Lee led an assault on both flanks and the center simultaneously, however this did not achieve the desired outcome.
The Conferdarates were missing a cavalry that arrived two days late.
And it was the Union that noticed the Confederacy was weakest at tge center and the Union attacked the Confederacy's center which is why they won. But they very well may have one if that last cavalry had shown up on time.