This is probably the short story 'Arena' by Frederic Brown.
As mentioned in @beichst's answer, an episode of Star Trek TOS also called Arena was written with striking similarities to this short story, although it was not intended for this short story to be the basis. Brown was later provided with the credit for the teleplay.
It features a galactic battle between humanity and a mysterious race called 'The Outsiders' when another race of greater powers intervenes!
Here is part of the plot summary from Wikipedia, I've highlighted the important bits pertaining to the question:
The mysterious Outsiders have skirmished with Earth's space colonies and starships. Their vessels are found to be faster and more maneuverable, but less well armed. There have been no survivors of the small raids on Earth forces so Earth has no information about the Outsiders. Fearing the worst, Earth builds a war fleet. Scouts report a large armada approaching the solar system. Earth's defenders go to meet them. All indications are that the two fleets are evenly matched.
Bob Carson is the pilot of a small one-man scout ship on the outskirts
of the fleet. While engaging his Outsider counterpart in battle, he
blacks out. When he awakens, he finds himself naked in a small
enclosed, circular area about 250 yards (230 m) across. ..
Carson hears a voice in his mind that identifies itself as the end
product of the evolution of an entire race. While traveling through
various spaces and dimensions, it had come upon the impending battle.
The evolved intelligence decided to intervene because both humans and
Rollers have the potential to one day evolve into a being like itself,
but the upcoming war would utterly destroy one side and hurt the other
so badly that it would not be able to fulfill its destiny. It
therefore chose one individual from each species to fight in this
small arena. The loser will doom its kind to instant extinction.
Carson and his opponent discover, through trial and error, that there
is an invisible barrier between them, and that living things cannot
cross it, though inanimate objects can. Carson tries to communicate
with the Roller, to see if a compromise is possible, but receives a
mental message of unremitting hatred.