The closest case would be the boarding of the German supply ship Altmark by the British HMS Cossack, which occurred in February 1940. At the start of the war, Altmark had been operating in the South Atlantic. There, she had provided resupply to the commerce raiding cruiser Admiral Graf Spee. During these operations, she took aboard prisoners from the merchant ships sunk by Graf Spee - ultimately, she would be carrying 299 men, mainly from the British Merchant Navy. On the 17th December 1939, Graf Spee would be scuttled in Montevideo harbour following the Battle of the River Plate. Altmark's captain, Heinrich Dau, took this as his prompt to return to Germany. His route back, plotted to avoid RN patrols, took his ship around the north of Great Britain, and down the neutral Norwegian coastline. He managed to evade British forces until the 14th February 1940, when Altmark was sighted by aircraft from 220 Squadron RAF.
This sighting caused the British to scramble to put together a response, in the hope of freeing the prisoners aboard her. As Norway was neutral, the RN could not legally intervene to stop Altmark, so a diplomatic solution was initially applied. The British government requested that the Norwegian Navy stop and inspect her. This was carried out at three separate occasions on the 14 and 15th February. At all three, the Norwegians carried out a cursory inspection of the ship, and accepted the German claim that they were doing nothing untoward. Following the last inspection, Altmark was escorted southwards by the Norwegian vessels Skarv, Kjell and Firern. Dau decided to spend the night in Jossingfjord, after having been sighted by a British force centred around the cruiser Arethusa. He believed that the Norwegians would defend their neutrality, and prevent any British ships interfering with Altmark in the fjord. He was justified in this, as the Norwegians had impeded attempts by Arethusa and her consorts to stop Altmark. However, the British commander (Cossack's captain), Philip Vian, was given direct orders from Churchill to liberate Altmark's prisoners. On the 16th, Cossack entered the fjord, and requested that the Norwegians take Altmark to Bergen, with an combined Anglo-Norwegian guard aboard and escorting her. The Norwegians refused this, and so Vian left the fjord to begin preparations for a boarding action.
Cossack reentered the fjord following sunset. Vian informed the Norwegian commander that he planned to board Altmark and locate any prisoners himself. The Norwegian was invited to join the boarding party, but he ultimately refused. At 11pm, Dau realised that the ship approaching Altmark was British, not Norwegian. He attempted to escape, training a searchlight on Cossack's bridge to blind her bridge crew. This failed, so Dau attempted first to ram Cossack and then to drive Altmark ashore. Despite this, the British managed to get a boarding party away, led by Lieutenant Commander Turner. Due to the manoeuvring of both ships, Turner had to jump a 6ft gap to board, a leap that some of his boarders nearly didn't make. Thirty-three British seamen and officers got aboard Altmark, and began to seize control of the ship. There was some fighting aboard, with one British sailor, Gunner Smith, and eighteen Germans being wounded, of which seven Germans would die. While Turner successfully captured Altmark's bridge, the ship had considerable sternway on her, and she ran aground. Ten minutes after the boarding, the full contingent of prisoners had been freed, and were evacuated onto Cossack following rumours of scuttling charges having been set aboard Altmark. Cossack left Altmark stranded in Jossingfjord, and returned home to a heroes welcome.
The Altmark incident, as this became known, instantly became fodder for propagandists on both sides. The Germans seized on the perfidious nature of this attack, a major breach of Norwegian neutrality. They claimed Altmark had been operating in scrupulous accordance with international law. On the British side, the action was celebrated as being in the best traditions of the Royal Navy, and many of Cossack's crew, especially Turner, were lionized in the press. The breach of international law was justified by claiming that Altmark a 'hell-ship', and that she was an armed auxiliary rather than an innocent merchant - with the second claim having rather more justification. Even so, the action didn't reflect well on the RN, and it was a factor in encouraging the German invasion of Norway.
Sources:
The Attack on the Altmark: A Case Study in Wartime Propaganda, Martin A. Doherty, Journal of Contemporary History, Vol. 38, No. 2 (Apr., 2003), pp. 187-200
The "Altmark" Incident, Bulletin of International News, Vol. 17, No. 4 (Feb. 24, 1940), pp. 225-231
The Gathering Storm: The Naval War in Northern Europe, September 1939 - April 1940, Geirr Haarr, Seaforth, 2012
Honestly, none that really stand out, and really there weren't many times when enemy vessels even got that close to each other.
For large vessels the one moment that is probably foremost in the public mind and imagination is the encounter between HMS Glowworm and the Admiral Hipper. In April of 1940 the Kriegsmarine and Royal Navy were engaged in a series of encounters covering the German invasion of Norway, with both sides taking painful losses.
On April 8 Glowworm was rejoining her place as part of the screen of the battlecruiser Renown when she encounter a convoy and 2 German destroyers, who immediately called for help. Hipper had been nearby and soon began firing upon Glowworm and seriously damaged her forcing her to retreat into a smoke screen. When she cleared she was cutting across the bow of the cruiser at just several hundred yards, and the Hipper could not turn in time, thus Glowworm struck the cruiser just aft of her bow, losing her own bow in the process and slowly grinding down the side of the ship. There was some fear as to the British intentions as well, but soon it became clear that the destroyer was simply not under control and in its death spiral. Her crew was rescued by the Germans as well and her skipper became the first British service member awarded the VC in WW2. A photo of Glowworm as she clears the smoke, and cuts across the clearly marked bow of Hipper.
There were a few other instances where boarding did occur, but it was mostly enterprising men boarding damaged U-Boats, in part to help recover intelligence, and Enigma machines and codebooks.