The construction "<noun> venir de <infinitive>" is called the recent past. It literally means "<noun> comes from <action>" which suggests something has completed, but only recently.
The English equivalent of this is saying "<noun> just <simple past>", so something like "I just ate" or "I just swam", these similarly imply a completion of a task but in a recent sense.
In this sentence: "je viens d'aller" -> "je just aller" and aller is "to go" which has a simple past of "went" so all together... "je viens d'aller" = "I just went"
I hope that helps. Other examples are like "je viens de manger" is "I just ate" or "je viens d'acheter [qch]" is "I just bought [something]"
As usual, Laura Lawless has a page about (almost) exactly this!
Unfortunately, it doesn't tell me which would be a better fit here. If you can figure it out, do post!
If the speaker is at the restaurant, he says "I have just come to/arrived at the restaurant." Only if the speaker has gone to the restaurant and then gone somewhere else, would he be using "aller" rather than "venir" or "arriver à". In that case, the most natural English would be: "I've just been to the restaurant" or "I've just got back from the restaurant"; which raises the suspicion that the French snippet isn't all that natural either.
It is interesting to learn a language that who never heard about the "passé récent" asks rightly: "Why is this "I just went!. Where does the past tense come from?"
As a retired teacher I am wondering that without explanation they use the rules of grammar as traps. And we step into it, and we have to look for the rules. There is another which I have to mention that in the same test they cross the word -as a wrong answer and the next attempt what I see my wrong answer was there as another option. Not only today but several times:
TODAY/5th January 2014 ."La couleur du tapis va bien avec le mur." Translation: The carpet's color goes well with the wall.
I wrote: The carpet's color fits well with the wall.....first it was mistaken, and what a surprise! In the next turn this sentence was there as another option. Not once I had to repeat my test as in this way we loose very quickly the three hearts.
I thank everyone for all of the wonderful explanations. I just want to understand why since I had never seen "venir d'aller" I scrolled over the words and Duolingo gave me "just go" as the definition so I used it. Why not give me the correct translation for the phrase "just went"??? Please fix this.
The rule is: noun (pronoun) + venir de + infinitive = noun (pronoun) + just + simple past.
The example Je viens d'aller fills all those requirements. Telling you that viens d'aller means just went would be misleading as there are other parts to the rule. Especially since the three components are not always nicely grouped so as to be easy to spot. Even being well aware of the rule it is easy to focus on some other tricky word and miss the big picture of the change in tense.
The same rule applies to sortir de with the same caveats.