- Video report by ITV News Correspondent Angus Walker
Following more than two hours of "detailed and constructive" talks at a country manor on the Wirral, both leaders said it was in "everybody's interest" to get an agreement which would allow the UK to leave with a deal.
After a "very good meeting" with Mr Johnson, the Irish Taoiseach said he is "absolutely convinced" Britain wants a Brexit agreement.
"I do see a pathway towards an agreement in the coming weeks," Mr Varadker said, a very different stance from what he last earlier this month.
But he added there are issues yet to be resolved.
ITV News Political Editor Robert Peston has said the cabinet has not been briefed about the prime minister's recent Brexit talks.
Brexit Secretary Stephen Barclay will meet the EU's chief negotiator, Michel Barnier, in Brussels on Friday when they are expected to assess whether there are the grounds to move forward.
Mr Johnson almost certainly needs the EU leaders gathering in Brussels on October 17 and 18 to sign off on an agreement in order to be able to take Britain out of the EU on October 31 with a deal.
Speaking to reporters at Liverpool Airport before his return to Dublin, Mr Varadkar said while there were still issues to be resolved, he believed it was possible to meet the Halloween deadline.
"I think it is possible for us to come to an agreement, to have a treaty to allow the UK to leave the EU in an orderly fashion, and to have that done by the end of October, but there's many a slip between cup and lip," he said.
He added: "In terms of how long it will take, I can't predict that with any certainty, but I think all sides would like there to be an agreement next week at the council if possible.
"Obviously there's a further deadline after that which is the 31st of October, so I would say a short pathway rather than a long one, but it's impossible to predict that for sure."
With the crucial EU summit in Brussels starting in a week, the chance of the prime minister securing a new Withdrawal Agreement has looked increasingly unlikely.
Earlier in a joint statement, both leaders said they would "reflect further" on their discussions while their officials would continue to "engage intensively".
"Both continue to believe a deal is in everybody's interest. They agreed that they could see a pathway to a possible deal," the statement said.
The meeting at the 19th-century Thornton Manor - now a luxury wedding venue - was seen as a last chance for Mr Johnson to get his hopes of an agreement back on track.
The Irish and other EU governments have objected to proposals to take Northern Ireland out of the EU customs union - along with the rest of the UK - meaning the return of customs checks on the island of Ireland.
They have also voiced strong concern about proposals in the plan for the new arrangements to require the consent of the Stormont Assembly, effectively handing a veto to the DUP.
The unexpectedly upbeat statement comes at the end of a week marked by acrimonious exchanges between London, Dublin and Brussels in which the negotiations appeared close to collapse.
Briefings by anonymous No 10 sources accused Mr Varadkar of backtracking on previous commitments to try to find a deal and of refusing to negotiate.
And following a heated telephone call between Mr Johnson and German Chancellor Angela Merkel on Tuesday, they claimed the EU was making it "essentially impossible" for Britain to leave with a deal.
Government sources have said ministers are preparing to hold an emergency Saturday sitting of Parliament on October 19.