The border-image property can accomplish this. You'll need to specify border-style and border-width too.
border-image: linear-gradient(#f6b73c, #4d9f0c) 30;
border-width: 4px;
border-style: solid;
.border {
border-image: linear-gradient(to right, #3acfd5 0%, #3a4ed5 100%) 1;
border-radius: 5px; /* this doesn't work */
border-width: 4px;
border-style: solid;
padding: 5px;
}
<p class="border">border-image: linear-gradient(to right, #3acfd5 0%, #3a4ed5 100%) 1</p>
Read more on MDN.