The Battle of Gainesville (not to be confused with the First Skirmish of Gainsville of February 15, 1864) was fought on August 17, 1864, when a Confederate force defeated Union detachments on a raid from the Union garrison in the Jacksonville, Florida, area. However, the other and first Battle of Gainesville was fought on 14 February 1864, when a unit associated with the February 1864 Florida Expedition, defeated a Confederate cavalry unit.

Gainesville, site of a railroad junction and depot in north central Florida, was the scene of two small-scale engagements during the war. On 14 February 1864, the first battle occurred when about 50 Union troops entered the city intending to capture two trains. Company H of the 2nd Florida Cavalry with 130 men attempted to repulse this raid but were defeated by the Union force, which successfully returned to Jacksonville after holding the town.

Listed in the War's Official Orders is a General Order signed by Brigadier General Truman Seymour on 17 February 1864, stating that he:

"...especially desires to praise Capt. George E. Marshall, Co. G. 40th Mass. Mounted Volunteers, and his small command of forty-nine men who captured and held Gainesville for fifty-six hours, receiving and repulsing an attack from more than double his force, and, after fulfilling his mission successfully, returning to the designated place of rendevous."

The Battle of Gainesville took place on August 17, 1864, in the town square. The fighting was viewed by many of the townspeople from the windows of the Beville house near downtown. Three hundred forty-two Union troops of the 75th Ohio Mounted infantry, reinforced by two companies of the 4th Massachusetts Cavalry and supported by a battery of 3 cannons from Battery A, 3rd Rhode Island Heavy Artillery under the command of Col. Andrew L. Harris occupying the city were attacked from the rear by some 200 soldiers of the Second Florida Cavalry, under the command of Captain John Jackson Dickison (companies H and F), supported by local militia, elements of 5th Florida Cavalry Battalion and a small artillery battery of two cannons for a total strength of about 290 (although only 175 would be engaged in the actual fighting).

The Union column, tired from a long march in the hot summer sun of Florida, was taken by surprise and did not have time to fully deploy when the main attack commenced. After just over 2 hours, the Union troops were routed, driven out of town and suffered significant casualties — 28 dead, 5 wounded, 86 missing or unaccounted for, and 188 captured, along with 260 horses and a 12-pound howitzer lost. The Confederates lost 3 killed and 5 wounded (2 mortally). Only 40 Union troopers and Colonel Harris escaped. He reported his column was destroyed by a large Confederate force of 600-800 men and 3 cannons.

After hearing his account, the remaining Union forces in the north central Florida area withdrew to the garrisons at Jacksonville and St. Augustine. Gainesville would remain in Confederate control for the duration of the war.

Battle of Gainesville
Part of the American Civil War
Date August 17, 1864
Location Gainesville, Florida
Result Confederate victory
United States United States (Union) Confederate States of America CSA (Confederacy)
Commanders and leaders
Andrew L. Harris John Jackson Dickison
342 about 290 (only 175 actually engaged)
Casualties and losses
302 (28 killed, 188 captured, 86 missing or captured) 8 (3 dead, 5 wounded—2 mortally)