No, the Black Pearl was not affected by the Aztec curse that turned its crew immortal (with one possible caveat; see the bottom of my answer).
However, the ship has other magical properties. It started its life as the Wicked Wench, captained by Jack Sparrow under the East-India Trading Company. When Sparrow broke with them, the Company branded him a pirate and sunk his ship. Jack sold his soul to Davy Jones of the Flying Dutchman in exchange for getting the Wench back, which he re-christened the Black Pearl.
This is told in abridged version in Pirates of the Caribbean: Dead Man's Chest, and the story is told in full in the prequel novel Pirates of the Caribbean: The Price of Freedom.
We never learn exactly what the terms of Jack's deal with Jones was, but it is implied that it's the fastest ship there is and that its speed is a magical property:
"I believe that with the wind, the Pearl will be the fastest ship you've ever sailed on. Uncatchable, savvy?"
Jack felt confident that his boast would prove true. So far, Davy Jones had fulfilled his side of the bargain admirably. Jack had been very careful when he'd negotiated, making his terms very precise.
It is even faster than the Flying Dutchman, perhaps because Jack wanted to try to outrun Davy Jones when the time of the reaping of his soul came (the deal gave him 13 years with the Black Pearl first). We also know the ship was resurrected with slightly different physical properties:
Jack sometimes wondered why Davy Jones had felt it necessary to supply Jack's ship, the resurrected and transformed Wicked Wench, with a figurehead. The original Wench didn't have one.
In addition, the resurrected ship was painted black (hence the name) to hide the burn marks it received when it was sunk in a fiery inferno. It also had black sails. When the lights aboard were doused, it was very hard to see the ship in the dark, which gave the crew the element of surprise in sneak attacks like that.
I can't find any explicit references that say the ship was imbued with any special powers beyond its speed, but it's possible it was also strengthened. It was probably not magically impervious to destruction, though, as we see in the movies. Jack also says this in the prequel novel, which implies that no, nothing really prevented the fort cannons from sinking the ship:
Jack rummaged through his sea chest until he pulled out two large rectangles of silk. One was white. He’d need it to be allowed to approach Shipwreck Island for a parlay. Otherwise, the cannons mounted on the cliff walls would make short work of his Pearl—and he couldn’t have that. He’d sacrificed too much for this ship.
So it's at the very least a speedy, stealthy ship with an immortal crew and legendary status that scared potential attackers.
As Hurkyl points out in their answer, a thick fog also seemed to follow the Black Pearl around, making it extra stealthy; however, this feature is not confirmed to be Davy Jones's doing. The article on the PoC wikia actually implies it's due to the Aztec curse, but doesn't back it up with any sources.