HMS Defender left Russian waters soon afterwards, having ventured as much as 2 miles inside, the ministry said.
However, the UK's Ministry of Defence said no Russian warning shots were fired and it did not recognise assertions that bombs were put in the vessel's path.
Russia seized and annexed the Crimea peninsula from Ukraine in 2014 and considers areas around the peninsula's coast to be Russian waters.
"No warning shots have been fired at HMS Defender", it said in a statement.
The British Ministry of Defence did not immediately respond to a request for comment.
On Wednesday, UK Defence Secretary Ben Wallace said in a statement that the HMS Defender had been carrying out a "routine transit from Odesa towards Georgia across the Black Sea".
Incidents involving aircraft or ships are not uncommon at Russia's borders, especially during heightened tensions with the West, but rarely result in open fire.
Relations continued to decline following Russia's annexation of Crimea, with further incidents including its intervention in Syria 2015 and its alleged meddling in the 2016 and 2020 US elections. It returned the crew and the boats the following year.
North Atlantic Treaty Organisation members Turkey, Greece, Romania and Bulgaria all are on the Black Sea but warships from the US, UK and other North Atlantic Treaty Organisation allies also have made increasingly frequent visits in a show of support to Ukraine.
The Royal Navy warship, one of the nation's newest and most technologically advanced, had sailed from the United Kingdom last month with the new carrier taskforce, but detached a fortnight ago to head to the Black Sea.
That HMS Defender in the Black Sea to sell warships to Ukraine - against whom Russian Federation has been openly fighting and attempting colonisation regions of for years - may go some way to explain the hostility on Wednesday morning.
This article was updated to correct the list of North Atlantic Treaty Organisation members on the Black Sea.
"The moves by warships of the US and its allies have been clearly provocative", Gerasimov said at an global security conference in Moscow organized by the Defense Ministry.
Interfax said the British warship had been warned that weapons would be fired if it entered Russian waters and that a "border patrol ship" fired twice.
In April, Russia imposed restrictions on foreign navy ships' movements near Crimea until November in a move that drew strong complaints from Ukraine and the West. Russia has rejected that criticism and noted that the restrictions wouldn't interfere with commercial shipping. Moscow withdrew some of its forces after sweeping maneuvers, but Ukrainian officials say that the bulk of them have remained.
Speaking earlier Wednesday via video to participants of the security conference, President Vladimir Putin expressed concern about North Atlantic Treaty Organisation forces near Russian Federation.
"Russia is in a very, very hard spot right now", he said.
He said "the world is rapidly sinking in a new confrontation, which is much more unsafe than during the Cold War times".