Buford laid out his defenses on three ridges west of Gettysburg: Herr Ridge, McPherson Ridge, and Seminary Ridge. These were appropriate terrain for a delaying action by his small cavalry division against superior Confederate infantry forces, meant to buy time awaiting the arrival of Union infantrymen who could occupy the strong defensive positions south of town at Cemetery Hill, Cemetery Ridge, and Culp's Hill. Buford understood that if the Confederates could gain control of these heights, Meade's army would have difficulty dislodging them.

Heth's division advanced with two brigades forward, commanded by Brig. Gens. James J. Archer and Joseph R. Davis. They proceeded easterly in columns along the Chambersburg Pike. Three miles (5 km) west of town, about 7:30 a.m. on July 1, Heth's two brigades met light resistance from vedettes of Union cavalry, and deployed into line. According to the lore, the first Union soldier to fire was Lt. Marcellus Jones. In 1886 Lt. Jones returned to Gettysburg to mark the spot where he fired the first shot with a monument. Eventually, Heth's men reached dismounted troopers from Col. William Gamble's cavalry brigade, who raised determined resistance and delaying tactics from behind fence posts with fire from their breechloading carbines. By 10:20 a.m., the Confederates had pushed the Union cavalrymen east to McPherson Ridge, when the vanguard of the I Corps (Maj. Gen. John F. Reynolds) finally arrived.

North of the pike, Davis gained a temporary success against Brig. Gen. Lysander Cutler's brigade but was repulsed with heavy losses in an action around an unfinished railroad bed cut in the ridge. South of the pike, Archer's brigade assaulted through Herbst (also known as McPherson's) Woods. The Federal Iron Brigade under Brig. Gen. Solomon Meredith enjoyed initial success against Archer, capturing several hundred men, including Archer himself.

Early in the fighting, while General Reynolds was directing troop and artillery placements just to the east of the woods, he fell from his horse; he was killed by a bullet, which struck him behind the right ear. Maj. Gen. Abner Doubleday assumed command. Fighting in the Chambersburg Pike area lasted until about 12:30 p.m. It resumed around 2:30 p.m., when Heth's entire division engaged, adding the brigades of Pettigrew and Col. John M. Brockenbrough.

As Pettigrew's North Carolina Brigade came on line, they flanked the 19th Indiana and drove the Iron Brigade back. The 26th North Carolina (the largest regiment in the army with 839 men) lost heavily, leaving the first day's fight with around 212 men. By the end of the three-day battle, they had about 152 men standing, the highest casualty percentage for one battle of any regiment, North or South. Slowly the Iron Brigade was pushed out of the woods toward Seminary Ridge. Hill added Maj. Gen. William Dorsey Pender's division to the assault, and the I Corps was driven back through the grounds of the Lutheran Seminary and Gettysburg streets.

As the fighting to the west proceeded, two divisions of Ewell's Second Corps, marching west toward Cashtown in accordance with Lee's order for the army to concentrate in that vicinity, turned south on the Carlisle and Harrisburg Roads toward Gettysburg, while the Union XI Corps (Maj. Gen. Oliver O. Howard) raced north on the Baltimore Pike and Taneytown Road. By early afternoon, the Federal line ran in a semicircle west, north, and northeast of Gettysburg.

However, the Federals did not have enough troops; Cutler, who was deployed north of the Chambersburg Pike, had his right flank in the air. The leftmost division of the XI Corps was unable to deploy in time to strengthen the line, so Doubleday was forced to throw in reserve brigades to salvage his line.

Around 2:00 p.m., the Second Corps divisions of Maj. Gens. Robert E. Rodes and Jubal Early assaulted and out-flanked the Union I and XI Corps positions north and northwest of town. The brigades of Col. Edward A. O'Neal and Brig. Gen. Alfred Iverson suffered severe losses assaulting the I Corps division of Brig. Gen. John C. Robinson south of Oak Hill. Early's division profited from a blunder made by Brig. Gen. Francis C. Barlow, when he advanced his XI Corps division to Blocher's Knoll (directly north of town and now known as Barlow's Knoll); this represented a salient in the corps line, susceptible to attack from multiple sides, and Early's troops overran his division, which constituted the right flank of the Union Army's position. Barlow was wounded and captured in the attack.

As Federal positions collapsed both north and west of town, Gen. Howard ordered a retreat to the high ground south of town at Cemetery Hill, where he had left the division of Brig. Gen. Adolph von Steinwehr as a reserve. Maj. Gen. Winfield S. Hancock assumed command of the battlefield, sent by Meade when he heard that Reynolds had been killed. Hancock, commander of the II Corps and his most trusted subordinate, was ordered to take command of the field and to determine whether Gettysburg was an appropriate place for a major battle. Hancock told Howard, who was technically superior in rank, "I think this the strongest position by nature upon which to fight a battle that I ever saw." When Howard agreed, Hancock concluded the discussion: "Very well, sir, I select this as the battle-field." Hancock's determination had a morale-boosting effect on the retreating Union soldiers, but he played no direct tactical role on the first day.

Gen. Lee understood the defensive potential to the Union if they held this high ground. He sent orders to Ewell that Cemetery Hill be taken "if practicable." Ewell, who had previously served under Stonewall Jackson, a general well known for issuing peremptory orders, determined such an assault was not practicable and, thus, did not attempt it; this decision is considered by historians to be a great missed opportunity.

The first day at Gettysburg, more significant than simply a prelude to the bloody second and third days, ranks as the 23rd biggest battle of the war by number of troops engaged. About one quarter of Meade's army (22,000 men) and one third of Lee's army (27,000) were engaged.