It matches within +/- 1 of the team's middle rank. If you have 3 unranked, you'll at most get paired with 1 bronze. If you have 3 bronze, the most you'll get matched with is a silver. However if you have 2 bronze, 1 unranked, then again you could be matched with a silver.

In your case your team had a silver as the mid-rank, which can be matched with either bronze, silver, or gold. You were the bronze, and you must have had a gold on your team as well as 1-2 silver.