At the Battle of Mobile Bay, Adm. David G. Farragut commanded an 18-vessel fleet that included two monitors and his own wooden-hulled flagship, USS Hartford. The entrance to Mobile Bay was guarded by Fort Gaines and Fort Morgan, and between the bay was blocked by pilings and underwater mines -- then called "torpedos." One of the mines had sunk the monitor USS Tecumseh, and the captain of the wooden-hulled USS Brooklyn, which was in the lead of Farragut's fleet, slowed for orders before approaching the minefield. Farragut then allegedly made the famous order that the Hartford's captain "damn the torpedos," and to go ahead through them at full speed. Hartford and most of the other ships passed Brooklyn and went through the mine field without (I believe) any serious mishaps from the mines. What reason did Farragut, if he had any, have to believe that the minefield would not sink his ships? Or did Farragut believe that operating at full speed would help keep the Hartford from blocking the channel to the other ships, even if the mines detonated and sank the flag ship?
He didn't know anything of the sort. He had to make a calculation based on the facts.
Naval mines, then called torpedoes, were dangerous but unreliable, especially the Confederate ones. Although he had just seen the Tecumseh go down, showing that at least one mine was functional, he also knew that the confusion in the line of ships because of the sinking led to his unarmored ships being stationary under fire of the forts. Staying put would mean that ships and men would be lost to gunfire from the forts.
Believing action better than inaction, he risked the torpedoes and losing additional ships to gain entrance into the bay and thus shutting down the port. As it turned out, no other ships were lost although there were reports of sailors hearing the snap of the firing mechanisms.
Once the fleet was inside, the port was lost - unless the Rebel ironclad could defeated his entire fleet. It failed to do this, and soon landings behind the forts led to their evacuation, thus closing down the last Gulf port.
He didn't, and didn't plan to.
The minefield at the entrance to Mobile Bay was well-known and clearly marked. Its purpose wasn't to sink attacking ships, but to force them close to the guns of Fort Morgan, where they could easily be sunk by artillery fire.
Farragut's initial plan for the battle was for two columns of ships to enter the bay through the passage between the minefield and Fort Morgan. The first column, of ironclads, would engage the fort and screen the other ships from gunfire.
However, Tecumseh, the leader of the ironclad column, strayed too far from the fort, struck a mine, and quickly sank. This threw the column of wooden ships into confusion, as they had clearly impossible orders (stay to port of the ironclads, but to starboard of the minefield). Farragut's response was to send his flagship to the head of the column and lead a charge through the minefield, which worked: his fourteen wooden ships and three remaining ironclads made it into the bay without further losses.
(Source: the Wikipedia article on the Battle of Mobile Bay)
David Farragut was an aggressive commander who sometimes exceeded his orders. In 1863 near Port Hudson, for instance, he had orders to co-ordinate a naval attack with a land based attack. Farragut decided to attack first, to obtain all the glory for the navy, and was defeated when the Confederates could concentrate artillery fire on him without the distraction of a land attack.
Another formative influence was the capture of New Orleans, which he had won by "going through" two enemy forts, and then destroying a large (but inferior) Confederate fleet, leaving the port at the mercy of his ships' guns. At Mobile, the Confederates had both two forts and torpedoes, but on the other hand, its fleet was much smaller than at New Orleans. Farragut coolly figured that while he had two barriers to get past, rather than one, his earlier experience had taught him that he was capable of doing this.
The effect of losses such as the the one sunk ship is psychological, as much as physical. Seldom do armies or navies take losses of as much as 50 percent (except in retreat, after being broken). Farrugut figured correctly that if he could get through the torpedoes and past the forts with "some" losses, what was left would be able to defeat the few remaining Confederate ships and capture the harbor. He was right of course, and the decisive factor in such battles is often the bravery and determination of the commander.
It's not a matter of Farrugut, Nelsono, or any other naval commander "knowing" he can get through. It's called "you pay your money and you take your chances." A good commander (in any environment) will know when to do this.
There's an underlying question of "why would a commander choose to charge through a minefield?"
The main purpose of a minefield is not to stop an attack, but to slow it down and restrict the attacker's movement while they carefully pick their way through it. A good minefield is placed in restricted terrain with clear fields of fire from the defenders, ideally a crossfire. This means more time spent in a very vulnerable position under the guns of the defenders.
The worst thing an attacker can do is have the attack stall out in the minefield. When you take your first mine casualty, people have a tendency to freeze. The threat is invisible and devastating. The most immediate counter is to stop moving.
By ordering their ships to charge through a commander is calculating that losses due to mines will be less than losses due to slowing down, or freezing, and spending more time getting shot at.
Weird parallel I know, (but it has the virtue that a lot of us have seen it), but this reminds me of the fictional Battle of Endor in Star Wars VI. The Admiral in charge made the order to engage with the enemy fleet not because that was a good idea, but because it was a much better idea than staying put and getting picked off one-by-one.