It wasn't gunpowder that changed tactics (strategy fundamentally hasn't changed). A phalanx of Greeks was a line six or eight men and as wide as it had men. A regiment of Napoleonic troops looked and behaved exactly the same, except their spear heads were lead balls stabbed on a fifty-pace shaft of smoke. Come to think of it, Greeks were exchanging lead balls on slings. Maybe there were multiple thinner lines, but Roman armies in the Republican days did the same. The pike and shot squares of the late Renaissance seem novel until we recognize they were mimicking the maniple Legion. Pre-gunpowder armies had adopted the square for cavalry defense well before Waterloo, and Roman artillery was prolific and effective. The world record for a land offensive was held by the Mongols until Desert Storm, and infantry marching on the Eastern Front were no faster than Roman legionaries. The bowstring becoming a chemical reaction didn't change this. In some ways, the musket forced even closer order formations, since noise, smoke, and vulnerability to cavalry (its a lousy replacement for a spear) required tight control and precise timing of volleys to keep from presenting a disorganized, half-reloading mob to the enemy cavalry.
The end of close order formations in open ground was smokeless powder and self-loading rifles. Once lever or bolt action rifles became standard issue with smokeless powder an individual could fire from concealment while having enough combat power to hold that ground. Consider an archer shooting at Romans from some German forest. He can be hidden, but if a dozen troops detach to find him, he can't hope to defeat them in hand-to hand. Consider a muzzle-loading rifleman in the Virginia woods. He can't stay hidden when he fires, and immediately draws a huge volume of fire onto his position if he does fire. But a smokeless, self-loading rifleman can't be picked out of concealment. He can fire with relative impunity and only give his position away by sound. The only defense against him is not to be seen, or to be so dug in that his fire is ineffective. This drove the British to trenches in the Boer war against an enemy without machine guns, but plenty of Mausers. But the end of one thing is not the beginning of another, and so WWI was an unthinking mess. The German army was the first to really figure out the solution, with their strong NCO tradition and officers accustomed to delegating. Open order came about when the small group leaders were finally given the freedom to exploit cover and concealment in the smallest possible units, without the mass formations officers previously used to control their men.
Incidentally the Roman manipular legions were exploiting battlefield freedom in 60-120 man units against hopelessly static Greek phalanxes, using javelins, swords, and an ability to switch between the two at a centurion's trumpet. Everything old is new again. But if I had to pin it to something, smokeless powder made attacking from concealment possible and swept the modern battlefield. It is now very, very elaborate hide-and-seek.