Derby had looked comfortable when two goals from Chris Porter on his full home debut put them in control, but the visitors kept plugging away and got their reward through Angel Rangel and Gorka Pintado.
Derby could count themselves unlucky after hitting both posts in the second half, but Swansea will take heart from the character they displayed.
It was an entertaining contest, full of enterprising football in conditions than often made it difficult to control the ball.
Derby were the more direct side but their front two of Porter and Rob Hulse gave Swansea problems all night and with better finishing they might have finished the Welsh side off.
Porter showed good reactions to open the scoring in 14th minute when he was first to the rebound after Dorus de Vries had pushed out a Robbie Savage free kick and Derby thought they had scored again in the 21st minute only for an offside flag to deny Rob Hulse.
For all their neat football, Swansea had rarely threatened and they found themselves chasing the game when a mistake by Ashley Williams in the 48th minute left Porter through to finish from twelve yards.
But Angel Rangel replied seven minutes later when he turned in a Jordi Gomez free-kick and Swansea must have sensed they would take something from the game when both Gary Teale and Steve Davies struck the woodwork.
They kept pressing and the pressure finally tolled in the 87th minute when Jason Scotland pulled the ball back and Pintado fired high into the net from ten yards.