I would deal with the gutter first. The picture doesn't really show how much roof it drains, but it looks like the area of the roof has the potential to be as much as the area of the ground between the houses. Plus, this is all water which is already in a downspout and can easily be diverted away.
The cheap & easy way to test this is to get some solid 4" drain pipe and set it up on the surface of the ground to take everything that comes off the roof down toward the shed. If this stops the moisture in the basement issue, you can then burry the pipe and be done with the whole thing. Looks to me like this would be maybe $100 to test. And, you are going to need the pipe to take care of the gutter anyway. The only proper place to divert the water from that gutter and downspout to is downhill from the house.
The pipe is white, is going to look ugly on top of the ground, and will deteriorate from UV in sunlight, but it is only a test.
* * * * *
Before you even think about a swale, french drain, or a ditch, you really need to remove some dirt from around your house. There is a stud wall behind the brick and you need to have at least 6" of foundation above the level of the dirt in order to prevent termites from getting into the stud wall. I know this is going to make getting a proper slope in the earth around the house even harder, but termites are worse than a damp basement.
Plus, this is not a maintenance-free 6" between the earth and the lowest course of bricks. You need to inspect it periodically, keep it free of leaves, pine needles and the debris, and clean off any termite tunnels you see. If it were my house and I saw a termite tunnel, I would get it exterminated.
* * * * *
The third most important thing to do is to establish a surface slope away from the house for at least 3' out from the house. Further would be preferable, but there is a property line in there somewhere. The tree and the heat pump are going to be obstacles, but it looks like you almost have a u-shaped swale started which starts near the house, goes downhill outboard of the heat pump, and then meanders back on the inside of the tree. It is not parallel to the house, but that is not a requirement. This is going to be pick, shovel and wheelbarrow work, but it doesn't look like there is that much dirt to actually move. While you are at it, clear the debris away from the bottom of the heat pump to prevent rust and blockage of the coils. This is also a good time to burry the drain pipe dealing with the water from the gutter and downspout.
* * * * *
If I had to bet on this, I would bet that the gutter and downspout is 80-90% of the problem and a root between the tree and the house has raised the level of the natural drainage and is causing water to pool and go underground, which is the rest of it. Test what you do with a hose. Don't allow water to pool near the base of the tree. If you deal with the pooling, the tree and the downspout it will not cost very much and may pay lots of dividends.
If that doesn't work, then you are looking at more cost and probably a french drain.