50 Ohm Board to Board Connector
You have perhaps two possibilities:


Use a short piece of small diameter \$50\Omega\$ coax cable, folded and soldered directly to the boards: however, while nice for a prototype, this solution poses problems from the point of view of engineering and production.
Use small RF/Microwave connectors like this one: I use this kind of objects from the year 2000 and, while the devices I use are designed for cable to board connection, there are devices designed for board to board connection, with board distances as low as \$2.5\mathrm{mm}\$. Also, there are many producers who offer such kind of devices.


Edit: I updated the answer by adding a link to the mating connector, precisely a plug, in order to have a board to board plug/receptacle couple of connectors. I stress the fact that the device shown are not exclusively produced by a single manufacturer, but there are several high quality producers that offers such devices.