The Prime Minister’s official account tweeted a picture of Mr Johnson with Ukraine’s president Volodymyr Zelensky.
It said: “What happens in Ukraine matters to us all. That is why I am in Kyiv today.
"That is why the UK will continue to stand with our Ukrainian friends.
“I believe Ukraine can and will win this war.”
It came as defence secretary Ben Wallace said the UK can “toughen up” its visa conditions for Russians, but expressed doubt that a total ban was the solution.
Mr Wallace said he does not like seeing that oligarchs’ wives are “enjoying themselves in Greece” while the Russian army is committing war crimes in Ukraine.
However, he insisted he is not sure “an outright ban is the right way”.
Mr Wallace’s comments come as Finland, Estonia and the Czech Republic have called for Brussels to implement an EU-wide ban on new tourist visas for Russians to enter the Schengen free travel area as punishment for Russia’s war against Ukraine.
Mr Zelensky had first urged the visa ban in an interview with the Washington Post earlier this month, saying Russians should “live in their own world until they change their philosophy”.
Both the EU and the US have rebuffed Ukraine’s demand so far.
Speaking to the BBC Radio 4’s Today programme, Mr Wallace said: “I certainly think we can toughen up the conditions of our visas. I am not sure whether an outright ban is the right way.
“I think that’s a matter for the Home Secretary to look at. But I don’t like, and I’m sure none of your listeners like, watching oligarchs’ wives or indeed Russian senior officials’ wives enjoying themselves in Greece or the south of France, or on super yachts around the world while their army is committing war crimes in Ukraine.
“I think that is very wrong. I think the problem has been all the way back to 2014, that Russia invaded Crimea, illegally annexed it, and then it was allowed in some countries to carry on as if nothing had really changed.”
Despite the war in Ukraine reaching its sixth month and fears the West might be losing interest, the Defence Secretary appeared optimistic.
On the EU’s resolve, Mr Wallace said: “I mean, the EU doesn’t always, you know, can’t even often decide on some of the most basic pan-European initiatives, whether that’s environmental standards, that’s just the way it is.
“But I think that’s why the Commission is there to do that work. But I don’t see any waning.
“There’s always a few disagreements about the levels of sanctions, but, fundamentally, the international community is united against what Putin is doing.”
Mr Wallace also claimed Russia is in a “very fragile position” at the moment, explaining its advance can be measured “in metres per week, not miles”.
He added: “We pretty much accept, well, we do accept, the sort of observations of Russian losses to be – if you combine deaths, injuries, desertions – over 80,000 of their armed forces. That’s 80,000 in six months compared to 15,000 they lost in a decade in Afghanistan.
“I think we are in a position where Russia is in a very fragile position.”
On whether Ukraine is realistically in a position to retake the territory that Russia still holds, Mr Wallace said: “I think Ukraine is getting itself into that position.”
Meanwhile, defence minister James Heappey warned cosying up to Russia would make the cost-of-living crisis “100 times worse”.
He told Sky News: “I think that I can understand why lots of people eating their breakfast and worrying about the cost of living will be agreeing with the premise of your question that, you know, arguably the most straightforward solution to the cost-of-living crisis is that we re-establish relations with Russia and everything goes back to the way that it was in the European energy market.
“Every single thing that I have seen in the last six months tells me that that would be catastrophic for security in the Euro-Atlantic.
“Thus not, not on some 10 or 15 or 20-year horizon, but within just a few years, we would find ourselves in a situation where an emboldened Russia was causing cost-of-living challenges that are 100 times worse than what we are seeing right now.”
Mr Wallace and Mr Heappey’s comments come on the day Ukrainians are marking 31 years of their country’s independence from the Moscow-controlled former Soviet Union.
In a video message, published on Twitter, Prime Minister Boris Johnson offered his heartfelt congratulations to the Ukrainian people, insisting that “for however long it takes, the United Kingdom will stand with you”.
Mr Johnson said: “Alas, today, Ukraine’s independence is threatened once again, and people are fighting with steel, with courage to defend their homes and their families and to preserve their right to decide their own destiny in their own country.
“I have never doubted for a moment that Ukraine is going to win this struggle, because no force on earth can overcome the patriotism of 44 million Ukrainians.”
“And however long it takes, the United Kingdom will stand with Ukraine and provide every possible military, economic and humanitarian support.
He added: “One day, Ukraine will come through this ordeal and achieve victory. And when that moment comes, as it will, we in the UK will be even prouder to be friends of Ukraine.”
Ukraine’s ambassador to the UK Vadym Prystaiko marked the occasion by urging UK citizens to be “patient” as the war-torn country “cannot afford to lose your support”.
He said: “To every UK citizen who is supporting Ukraine and our common values – I ask for your patience. We cannot afford to lose your support. The UK is providing us with the tools to stop Russia from spreading its destructive influence across civilised nations.
“You are playing a very important part in this fight. Ukraine will do what it takes to claim victory. When the war is over, there is certainly a great future for us all – one with close friendship tested through mutual struggles and the perseverance to tackle issues affecting the modern world.”
Meanwhile, Labour leader Sir Keir Starmer paid a visit to Ukrainian and British Army personnel at Salisbury Plain.
He said: “My mission, my message to the Ukrainian people, to our troops, our Nato allies, is that on the issue of defending Ukraine against Russian aggression, we stand united. We will not be divided politically in the United Kingdom on this and I’ve been able to deliver that message first-hand amongst this very, very impressive training.”