The home side were 1-0 up after a fifth minute penalty, but Titi restored parity 15 minutes later after Grant McCann's excellent through ball.
His strike partner Omer Riza made it 2-1 after an excellent run from Richard Garcia, but an 84th minute equaliser and a winner for the home side in the last seconds gave Derby the points.
Says Roger Cross: "We played very well but just fell away at the end."
Team: Andersson, Byrne, Minto, Garcia, Foxe, Potts, Newton, McCann, Camara, Riza, Courtois. Subs unused: Jackson (GK), Ferrante, U'ddin, Britton, Cascione.