Okay, to be honest, I'm having a hard time envisioning a scenario in which this would actually happen. Obviously, these hero vs. hero battles are almost always the result of some mix-up, but if that were the case in this instance, Bats would pretty much put Spidey down quickly and get to the bottom of things. Misunderstanding over, and we're partners. Nevertheless, that makes for boring discussion, so let's pretend that the defenders of New York City and Gotham City are opponents for some reason.
I'm going to say we're talking about Bruce Wayne Batman here and not Dick Grayson Batman, because Dick's Batman still isn't really established. (Plus, from reading the reviews it seems he gets beat up a lot)
Spider-Man's first battle with any adversary is almost always a disaster. (Didn't Screwball get the best of him not too long ago?) He gets pounded and/or embarrassed, goes home, figures it out, and then comes back and wins the day the next time around. Batman, on the other hand, pretty much pwns. The man is just prepared for anything and everything. In the recent (bizarre) Batman R.I.P. storyline, the character had devised a scheme for getting out of a coffin buried under six feet of dirt with his bare hands. He also had a backup personality capable of running his should his mind ever undergo psychological attack. Or something like that. Point is, the guy is prepared for anything, so a web-slinging superhero with a type of precognitive ability isn't going to be too far off his radar.
Spidey is stronger than Bats, however, and probably quicker. His reflexes are excellent thanks to his spider-sense, so not a lot that Batman would do should be able to surprise Spider-Man. (Spider-sense is awfully selective, though, if you ask me) Batman has the edge in martial arts prowess--he's basically a ninja on top of a samurai on top of a Shaolin monk etc--and equipment, though Spider-Man's web-slinging gets him out of a tight spot faster. Overall, I think Batman's the better and more ruthless fighter, and he's taken down tougher foes than Spidey in his day. (Mr. No Superpowers has held his own the Superman, for crying out loud!)
The x-factor here, however, is the fact that Spider-Man wins all sorts of battles he has no business winning. The guy is just tenacious as heck. He just keeps coming and throwing whatever he can find until the other guy goes down for good. (Excellent example: after driving a tanker truck into Juggernaut didn't work, Spider-Man buried him in wet cement. Just keep trying stuff, something's got to work!) I don't know that there's any character in comics with as much tenacity as Spider-Man has, so I don't know if even Batman has enough to keep the webhead down for the count.
If I were a betting man, however, I'd say that Batman ultimately comes out on top of this rivalry. He just doesn't lose. Even when he died, he did it on his own terms, and he took out one of the most powerful entities in the DCU in the process. Hopefully, after Batman takes Spidey down and realizes they're on the same side, they become partners. A Batman/Spider-Man team-up is the one thing in comics I've been hoping for since before I was into comics. They both have the best villains' galleries in their respective universes, they've got the best supporting casts, they're both brilliant, one's a detective, one's a scientist, their personalities would play perfectly off one another, and, as I've mentioned, they're the perfectly unstoppable combination of preparedness and perseverance.
On top of that, think of the video gaming possibilities!