Schools are required to provide additional resources both to gifted and special-needs children. However, your opinion as a parent (or even the teacher’s opinion) doesn’t count for much.
So get your child to a child psychologist and have them do an assessment. If you don’t get the result you need (happened to us, our child wasn’t very impressed with the first psychologist and didn’t do very well), get a second opinion, or a third, etc.
We ended up having a very good experience with a psychologist from a group called Positive Parenting Plus, who have offices in Sant Cugat and Barcelona.
Once you have your document in hand, the school will take you much more seriously and in many cases you will find flexibility you never thought possible.