Why is pawn to d3 the best move here? Total beginner at chess. I am analyzing a game I played.

The computer says the blue line here is the best:

r1bqr1k1/pp5p/2nb1p2/2p5/Q1Pp2pN/1P4B1/P3BPPP/4RRK1 b - - 0 1

1... d3
(1... Kg7 2. Bxd6 Qxd6 3. Nf5 Bxf5)


Why? If I move my pawn there, the bishop takes it without worries, it seems? 

I instead moved King to g7, hoping to lure the white knight in a trap. If he went for a fork on f5 attacking my queen and king, I would take the knight with my bishop. 

By going King to g7, his bishop would take my bishop on d6, then I would take his bishop with my queen, and then he would make his knight move to f5 for the fork. Then I would take knight with my bishop.

Ignoring the potentially better play, is this a bad move in and of itself?
r1bqr1k1/pp5p/2nb1p2/2p5/Q1Pp2pN/1P4B1/P3BPPP/4RRK1 b - - 0 1

1... d3
2. Bxd3 (2. Bd1 Bxg3 3. hxg3 d2 4. Rxe8+ Qxe8 5. Qb5 Qe5) Rxe1
3. Rxe1 Bxg3
4. Bxh7+ Kxh7
5. hxg3 


And Black wins the Bishop for two pawns.

Edit - I ran this position through Stockfish and was surprised to learn that Black is already about 2.5 pawns "up" while material is even.

The initial variation is inferior to the one that follows from Seth's suggestion below. My suggested move makes it much easier for Black. After Seth's "1. Bd1", there are no fireworks but it looks like Black improves his position with a dominating Queen in the center and a pawn on d2. Both players remained jammed up. If Black can activate his Rook and Bishop he's going to have a great game.