The attack on Naboo was to demonstrate that the Republic couldn't maintain the peace and protect its members, which would encourage dissension and conflict. Palpatine didn't want to win a battle right away, he wanted to weaken everyone. As it happens, Naboo didn't fall due to a bit of pure dumb luck, but everyone could still see the Republic had failed, and so Palpatine becomes Chancellor, albeit with the support of Amidala instead of using sympathy for her death to get the job. While that set the Trade Federation on its heels and delayed starting a widespread conflict, it still left them as bitter losers and demonstrated the weakness of the Republic. Palpatine can work with that.
Perhaps the original plan was for the Trade Federation, after winning at Naboo, to start doing the same thing to other planets which would have eventually led to a general war to break out. Sadly, that didn't happen, but there's still a way forward. He uses the Trade Federation's bitterness and gets them in bed with others who are ticked off by the Republic, forming the Separatists led by a charismatic ex-Jedi who'd been spending some time working the propaganda side of things talking about how inept yet oppressive the Republic was. Under the guidance of Tyrannus, the Separatists build up their forces and do it unopposed because on the other side, Chancellor Palpatine is being all "Give Peace a Chance" and not building up the Republic's forces and quietly making sure that no one investigates the Separatists too carefully, keeping them as apparently a simple political issue.
When the time is right, and the Separatist forces and Republic forces and the secret clone army no one else knows about are at sufficient strength, he arranges for the attempted assassination of Padme. Doesn't matter if it succeeds or not, he just wants the Jedi, especially that young hothead with the hots for her, Anakin, to investigate. Eventually, they'll find the link to the Separatists, and then they'll discover the ridiculously huge military force they've built up.
He also arranges for the Jedi to track down the Clone Army and discover it exists. That Obi-wan guy seems pretty clever, he'll do.
And then, when the Separatists find out that their secret is blown, Tyrannus convinces them the only way to save themselves is to launch a pre-emptive war to secure position before the Republic can get its act together. Palpatine, meanwhile, makes sure people in the Republic feel terrified because holy crap, we can't defend ourselves! Wait, what's that? A Jedi secretly arranged for a whole army to coincidentally be available in our hour of need? Hooray!
After that, he just needs the war to drag out. Get the civilians desperate for peace. Get the politicians to give him more and more power. Get his people in the bureaucracy. Get the Jedi out in the field, dispersed, where the odd couple can be picked off in battle cutting down their numbers. Cement the loyalty of most of the Republic military to him. Take the time, with him having power on both sides, to identify who might be significant threats and deal with them accordingly or subvert them. And after a few years, when the time is right, make his move.
Once everything was set up, it's the trivial matter of manipulating emo-douche Anakin and then making it look like the Jedi attacked him, justifying Order 66. Then a decapitation strike on the Separatists, which he could have done at any time, and Papa Papaltine's your uncle. He ends the war and prevented the insidious (no pun intended) plot of the Jedi to carry out a coup, he's got his people everywhere making a seamless takeover, and he's got the military to enforce it.