You can have a background image on the same element, overlaying it with a transparent gradient.
Since you are probably using gradients to give an element a glossy or three-dimensional feel, box shadows work much better for this. This is because linear gradients always stretch to the full size of the element (which can grow with user input), while a natural shine or shadow only highlights a fixed size on the top or bottom.
Browser support for linear gradients is a mess. I avoid using them. In particular, IE 7-9 can only emulate gradients with a weirdo DirectX filter directive which has issues.
Examples
Take this gradient from top to bottom:
background-image: linear-gradient(top, red 0%, bottom 100%);
Rails Long Term Support
Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)
Prevents you from data breaches and liability risks