Ramallo, who featured four times for the La Liga side's first team, arrives for an undisclosed fee, and manager Mark Warburton believes that he will improve the quality in his first-team squad.
Warburton is quoted by BBC Sport as saying: "Jota is a very talented left-sided player. He is very highly regarded in Spain.
"He offers us real technical craft, an attacking threat and excellent set-piece delivery. He adds another level of quality to the squad."
Brentford began life in the Championship with a 1-1 draw against Charlton Athletic last weekend.