Cinco de Mayo is not about Mexico gaining independence. Instead, it commemorates the defeat of the French in an underdog victory during the Battle of Puebla, May 5, 1862 during the Franco-Mexican War. It is celebrated to appreciate the Mexican culture and heritage.
Unfortunately, in many parts of the United States, commercialism has reduced it to a day of drinking and high jinks.
You can learn more about the Battle of Puebla here. *