This is interesting, but like with many alternative history scenarios you have to figure out how this happens.
Lets start with the New York City mayoral election of 1965. These were the OTL results (I'm picking all this up from the relevant Wikipedia page):
Lindsay Republican 867,310 1,149,106 total 45%
Liberal 281,796
Beame Democratic 983,109 1,046,699 total 41%
Civil Service 63,590
Buckley Conservative 341,226 13%
Here is an interesting but completely irrelevant fact. Lindsay, in 1965 and in his next run in 1969, was the last candidate for Mayor of New York to get over a million votes. Bloomberg topped out at 753,000 in his best run, in 2005, and de Blasio got 795,000 in 2013.
The highest percentage the Conservative line ever got in New York City mayoral elections was 23% for John Marchi in 1969. We can be safe in assuming that neither Buckley, nor anyone else, will get elected Mayor on the Conservative line alone. Buckley only got 60,000 votes more than Lindsay got on just the Liberal line.
Nor is Buckley defeating Beame if he challenges Lindsay in the Republican primary and defeats him. Lindsay's margin over Beame was only 103,000 votes, and and there were comfortably more votes on the Democratic line than on the Republican line. Even adding the 341,000 votes on the Conservative line to the Republican total, you still have to deal with the 280,000 votes on the Liberal line. Lindsay would still be on the Liberal line and would be getting those votes, plus some Republican votes. You really need a massive scandal involving Beame to help out here. With LBJ in the White House, you won't get any help from the federal Justice Department, or from the liberal Republican establishment in New York state.
So Buckley gets elected Mayor of New York. So he is somehow able to handle the unions -including the transit strike the day he takes office- and the prospect of riots after Martin Luther King's death, better than Lindsay did. Also, I'm pretty sure that no Mayor of New York has gone on to hold another elective office in history, and there is a good reason for that.
So the Buckley as Mayor portion come very close to ASB. You have to do something like get New York nuked as a result of the Cuban missile crisis, but the surviving electorate, mainly suburbanites living in Queens and Staten Island, elects Buckley, assuming he has survived. National politics would be changed in this scenario too.
Gore Vidal having a political career is much more plausible, and I'd like to see a timeline on this. He would have to keep his sexual preferences under wraps, but he would be hardly the first or the last politician to do this. He would have to take more right wing public positions than he really held, pretty standard in American politics. Mainly he would have be serious about the thing.
Vidal ran for Congress in a Hudson Valley district, the 29th when he ran in 1960 but the 28th starting in 1962, and lost 57% to 43%. You just have to figure out how to get him another 7%, and of course he can always try again in 1962, which isn't a presidential election year so there will be lower partisan Republican turnout (this was a heavily Republican district). If Vidal is elected in 1962, the New York State legislature, then completely Republican controlled, will gerrymander the district out from under him. Congressman Vidal could survive that, get re-elected in the LBJ landslide in 1964, and then lose in 1966. An alternative idea is that after one term in Congress, he loses due to redistricting in 1962, then moves to Manhattan, and makes a comeback in Lindsay's district, in the special election to succeed Lindsay in 1965. This district Vidal could probably hold as long as he wants to. We are assuming its Lindsay, not Buckley, that is elected Mayor in 1965 here.
I don't see how you get either Vidal or Buckley as the Republican and Democratic presidential candidates in 1968. There was a long list of pols more likely to be nominated.
If you want Buckley and Vidal to run against each other, have them run against each other in the 1965 special election in the "Silk Stocking" district to succeed Lindsay. Buckley then decides to continue in politics, and gets elected in 1966 in an upstate or Long Island congressional district. He then runs for Senate in 1970 instead of his brother, and wins, for the same reason. In 1976 Congressman Vidal defeats Moynihan in the Democratic primary, then defeats Buckley in the Senate election for that year. Ronald Reagan makes a surprise pick of Buckley as his VP pick in 1980 (why?). Buckley then gets elected President himself in 1988. In 1992 Senator Vidal somehow manages to run and win the Democratic nomination and runs against Buckley for President that year.