The moves

This is a completely normal Queen's Gambit Declined until move six. White's bishop on g5 pins the knight on f6 to the queen, and the d5 pawn looks like it's hanging.

♜︎♝︎♛︎♚︎♝︎♜︎♟︎♟︎♟︎♞︎♟︎♟︎♟︎♞︎♟︎♝︎♟︎♞︎♟︎♟︎♟︎♟︎♟︎♟︎♜︎♛︎♚︎♝︎♞︎♜︎
1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5 Nbd7 5.cxd5 exd5The knight on f6 is pinned, and d5 has only that knight defending it. It looks like White can win a pawn.

White plays 6.Nxd5??, and Black answers 6...Nxd5!, moving the pinned knight and letting the queen go.

♜︎♝︎♚︎♜︎♟︎♟︎♟︎♞︎♟︎♟︎♟︎♞︎♟︎♟︎♟︎♚︎♟︎♟︎♟︎♟︎♜︎♝︎♞︎♜︎
1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5 Nbd7 5.cxd5 exd5 6.Nxd5 Nxd5 7.Bxd8 Bb4+ 8.Qd2 Bxd2+ 9.Kxd2 Kxd8After the queens and bishops trade, Black is a knight up for a pawn.

Why it works

White expects 6...Nxd5 7.Bxd8 to win the queen, but 7...Bb4+ is a check. White must block with 8.Qd2, and Black takes that queen. When the dust settles both queens are gone, the bishops have been exchanged, and White has lost the knight from d5 in return for one pawn.

The key piece is the one that looks asleep: the bishop on f8 has had a clear diagonal to b4 ever since Black played ...e6. Before capturing on d5, always ask what checks your opponent has.

How White should respond

There's nothing to fix except the capture. In the position after 5...exd5, simply develop with 6.e3, the standard plan in this structure, and White has a good game with no risk.

♜︎♝︎♛︎♚︎♝︎♜︎♟︎♟︎♟︎♞︎♟︎♟︎♟︎♞︎♟︎♝︎♟︎♞︎♟︎♟︎♟︎♟︎♟︎♟︎♜︎♛︎♚︎♝︎♞︎♜︎
1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5 Nbd7 5.cxd5 exd5 6.e3The normal continuation. White keeps a small, comfortable edge.

Common questions

Why is it called the Elephant Trap?

Nobody knows for sure. The name has been in use for a long time, and its origin hasn't been documented.

Is a pin always real?

No. A pin to a queen is only relative: the pinned piece can move, and it will if the tactic behind it wins more than the queen.