The bar in Barcelona which I met my wife in is still there.
What does 'in' in the relative clause of this sentence mean? To understand this what subjects should I study?
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
This subject in grammar is called deferred prepositions. There is below the essential of what is useful to know about it, as shown in § 9.6 of CoGEL.
(CoGEL § 9.6) Normally a preposition must be followed by its complement, but there are some circumstances in which this does not happen. In the following three cases the DEFERMENT of the preposition is obligatory.
(a) Passive constructions with a prepositional verb where the subject corresponds to the prepositional complement in the active […]:
• Has the room been paid for?
• ∼ Has X paid for the room?
• ≁ *Has for the room been paid?
• She was sought after by all the leading impresarios of the day. [also in premodification : 'a much sought-after singer']
• He was not paid attention to.
(b) Infinitive clauses with thematization of the prepositional complement […]:
• He's impossible to work with.
(c) -ing clauses with thematization:
• He's worth listening to.
With interrogative and relative pronouns as prepositional complement, there are often alternative positions available: one formal with the preposition in its normal place before the complement [1, 2], the other informal with the preposition deferred to final position [1a, 2a]:
• At which house did you leave the car? < formal > 
• Which house did you leave the car at? [1a]
• Where did you leave your car? [1b]
RELATIVE CLAUSES […]:
• The old house about which I was telling you is empty. < formal >  […]
• The old house (which) I was telling you about is empty. [2a]
A prejudice against such deferred (or 'stranded') prepositions [1a, 2a] remains in formal English which, for direct or indirect questions and for relative clauses, offers the alternative of an initial preposition [1, 2]. The alternative construction is often felt, however, to be stilted and awkward, especially in speech. In some cases, such as the following, the deferred preposition has no preposed alternative:
• What did she look like?
• What I'm convinced of is that the world's population will grow to an unforeseen extent.
• All she could talk about was her dog.
In general, it is the most common and the short prepositions which can be deferred, in particular spatial prepositions […], compare:
• He left his coat in the car.
∼ . . . the car in which he left his coat
∼ . . . the car (that) he left his coat in
• He left politics because of the election results.
∼ . . . the election results because of which he left politics
∼ . . . * the election results (that) he left politics because of
• The plane was destroyed through the pilot's carelessness.
∼ . . . the pilot's carelessness through which the plane was destroyed
∼ . . . * the pilot's carelessness ((that) the plane was destroyed through
CoGEL A Comprehensive Grammar of the English Language
∼ systematic correspondence between structures
≁ no systematic correspondence between structures
You could say:
The bar in which I met my wife, is still open.
But when you mention the location, in this case Barcelona, it is more natural to use the relative pronoun where =
The bar where I met my wife is in Barcelona and it is still open.
The bar in Barcelona, where I met my wife, is still there.
However, as FF mentions in the comments, there is nothing wrong with the following:
The bar in Barcelona, in which I met my wife, is still open.
Maybe I have misunderstood the OP's question but I think it revolves around "in". The preposition in is used with/without names of streets, villages, towns, cities, countries and continents.
That bar is in Las Ramblas which is in Barcelona.
Barcelona is a city in Spain, a country in Europe.