That opened things up a little for Chelsea who drew level when Cesar Azpilicueta fired home a stunning volley in the 49th minute and the icing was on the cake for the visiting Blues when Leicester defender Marcin Wasilewski was sent off for a second bookable offence late in regular time.
Cesc Fabregas netted a match-winning double in extra-time to send the Blues through to the fourth round with Ranieri's reigning Premier League champions missing out after a decent beginning.
"I am happy with our performance until 2-0," said Ranieri.
"We started very well, put them under pressure and we were in control of the match.
"I think the key was when we conceded a goal from the last corner of the first half. We lost two dangerous men, Luiz on the first post and Gary Cahill at the back post. From that point something changed because I put so many new players and they don't have 90 minutes.
"The second key was when Wasilewski was sent off. At that point they scored again and it was difficult for us. I hoped to keep it to 2-2 in extra time until the end.
"I told the players to stay together and close the space. But Fabregas scored twice again and it was very difficult for us."