A surprise assault by Syrian insurgents on a Republican Guard base in Damascus, just a few miles from the presidential palace, elicited a furious military response on Tuesday, with government forces shelling surrounding neighborhoods in an escalation that brought combat in the Syrian conflict close to the heart of the capital.