There are several ways. I don't know if this issue exists when you run the project so I will cover all the bases.
Here are some suggesstions:
- Delete the Navigation Controller and embed your View Controller in a new Navigtaion Controller. The easiest way is to select your View Controller, go to the top navigation where you can see File, Edit, View, etc. and select Editor -> Embed In -> Navigation Controller.

- In your
viewDidLoad()
you can set the colour of your navigation controller like so:
navigationController?.navigationBar.barTintColor = UIColor.blue
In your story board, you can select the Navigation Controller scene and select the Navigation Bar and play around there, however the above 2 would be preferred.

If you want the gradient at run time, see this answer: https://stackoverflow.com/a/43637829/4008175
I am making the assumption that you have not created a custom navigation bar class with an @IBDesignable
element. I also have a feeling that when you run the project, the gradient won't be present, but since that is not mentioned, I would be ok if I am wrong.
See how these solutions work for you.