SAN FRANCISCO — Gay couples in Connecticut might not realize it, but they owe a debt of gratitude to the California Supreme Court.

In a 4-3 ruling Friday that legalized same-sex marriage in that New England state, the Connecticut Supreme Court relied heavily on the California court’s own 5-month-old gay-marriage ruling to reach many of its conclusions.