I read somewhere that Stalin's bad generalship was a factor. This is a period of history not commonly covered in University classrooms, so I'd love to hear more. Thanks in advance!
Before we start talking about the Battle of Warsaw, I'll start talking about the overall strategic situation.
At this point in time the Polish forces had been in full retreat from the Russian advance. There were two main prongs of the attack: the main force under Tukhachevsky and the Southwestern Front under Budydonny (with Stalin as his commissar). Because of the rapid nature of Tukhachevsky's advance, his forces had become thoroughly disorganized, and his southern flank was extremely weak (with only a weak "Mozyr Group" defending it and acting as his communications line to the Southwestern Front). Superior Polish intelligence was able to discern this area of weakness.
So, Warsaw is on the Vistula river, which acts as a major defensive line. Retreating Polish troops and new recruits used this line as an area to reorganize and regroup. On the other hand, Tukhachevsky had outran his supply lines-essentially forcing his troops to live off the land. This combined with the flow of reinforcements away from the West instead to Crimea meant that he would be unable to reinforce his units from the rear.
Tukhachevsky's plan was to bypass the main lines of resistance near Warsaw and to cross the Vistula river to the north, then cutting the rail line from Gdansk and swooping down into Warsaw, surrounding the city from all sides.
Pilsudski, on the other hand, was plotting a counterstrike against the Soviets. Instead of attempting to hold the city or the northern flank, he placed his elite units to the south of Warsaw to attempt to punch through the weak Mozyr group and get into the Soviet rear areas. Despite some initial confusion, the attack was successful and Soviet units soon found themselves cut off from their own headquarters. These units ended up having to fend for themselves, and in some cases the troops simply fled, while in other cases individual divisions and corps would attempt to fight their way out unsupported and would take heavy casualties. A large chunk of the army fled into German East Prussia where they were promptly disarmed and interned. The Southwestern front was busy attempting to capture Lviv and was unable to assist. Even if they were able to assist it is questionable if they would have any effect as they core unit, Budyonny's elite 1st Cavalry Army, was routed by a smaller Polish cavalry force a few days later.
In essence, good Polish planning, coupled with poor Soviet logistics and organization, resulted in a situation where the Poles were easily able to cut off communications between the front line and their command, resulting in utter chaos and a marked reduction in combat performance that was taken advantage of by the Poles. The failure of the Soviets to properly support Tukhachevsky's offensive (which was also partly his fault) essentially meant that any major setback would be decisive, as it was here.
Sources:
Davies: White Eagle, Red Star