normally, the sheathing (OSB or plywood) wood come down just over your foundation block and you caulk the the point where the sheathing meets the foundation all the way around, but I don't see any sheathing which means it is probably sitting up somewhat higher. If you can get to it from inside, try to use some kind of backer (plywood or foam board and then foam in the gaps with the black cans of greats stuff (higher expansion). If this doesn't seem possible, you might want to consider removing a few rows of siding, ripping a few narrow pieces of sheathing, attaching them to the studs, and reattaching the siding. The key is definitely filling the gap though.
As for the water intrusion--yes, more likely than not, it isn't flashed properly. The only good way to do this is to remove the siding right below the door on both sides, pull up the deck board. Then you put the metal flashing over your ledger board (so it will sit under the deck board when you reattach it) I use window flashing tape to adhere the vertical part of the metal flashing to the sheathing/wall. That way, any wind driven rain drains right over the flashing and goes below the deck instead of under your door sill.